/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

  1. require "spec_helper"
  2. describe "autotest/discover.rb" do
  3. context "with ./.rspec present" do
  4. it "adds 'rspec2' to the list of discoveries" do
  5. File.stub(:exist?).with("./.rspec") { true }
  6. Autotest.should_receive(:add_discovery)
  7. load File.expand_path("../../../lib/autotest/discover.rb", __FILE__)
  8. end
  9. end
  10. context "with ./.rspec absent" do
  11. it "does not add 'rspec2' to the list of discoveries" do
  12. File.stub(:exist?) { false }
  13. Autotest.should_not_receive(:add_discovery)
  14. load File.expand_path("../../../lib/autotest/discover.rb", __FILE__)
  15. end
  16. end
  17. end