PageRenderTime 26ms CodeModel.GetById 18ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/bundle/jruby/2.1/gems/rspec-core-2.14.8/spec/autotest/discover_spec.rb

https://github.com/delowong/logstash
Ruby | 19 lines | 17 code | 2 blank | 0 comment | 0 complexity | 65e2331e387ac6bb423550bd686ed5d4 MD5 | raw file
 1require "spec_helper"
 2
 3describe "autotest/discover.rb" do
 4  context "with ./.rspec present" do
 5    it "adds 'rspec2' to the list of discoveries" do
 6      File.stub(:exist?).with("./.rspec") { true }
 7      Autotest.should_receive(:add_discovery)
 8      load File.expand_path("../../../lib/autotest/discover.rb", __FILE__)
 9    end
10  end
11
12  context "with ./.rspec absent" do
13    it "does not add 'rspec2' to the list of discoveries" do
14      File.stub(:exist?) { false }
15      Autotest.should_not_receive(:add_discovery)
16      load File.expand_path("../../../lib/autotest/discover.rb", __FILE__)
17    end
18  end
19end