Skip to content

Commit

Permalink
dev: config for :focus
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed May 5, 2012
1 parent 73be258 commit 877dfa6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/rspec/mocks/stub_chain_spec.rb
Expand Up @@ -111,7 +111,7 @@ module Mocks


context "using => value" do context "using => value" do
context "starting with the same message" do context "starting with the same message" do
it "returns expected value", :focus => true do it "returns expected value" do
subject.stub_chain(:msg1, :msg2, :msg3 => :first) subject.stub_chain(:msg1, :msg2, :msg3 => :first)
subject.stub_chain(:msg1, :msg2, :msg4 => :second) subject.stub_chain(:msg1, :msg2, :msg4 => :second)


Expand All @@ -121,7 +121,7 @@ module Mocks
end end


context "starting with different messages" do context "starting with different messages" do
it "returns expected value", :focus => true do it "returns expected value" do
subject.stub_chain(:msg1, :msg2, :msg3 => :first) subject.stub_chain(:msg1, :msg2, :msg3 => :first)
subject.stub_chain(:msg4, :msg2, :msg3 => :second) subject.stub_chain(:msg4, :msg2, :msg3 => :second)


Expand Down
4 changes: 3 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -39,7 +39,9 @@ def treats_method_missing_as_private(options = {:noop => true, :subject => nil})
config.order = :random config.order = :random
config.extend(Macros) config.extend(Macros)
config.include(RSpec::Mocks::Methods) config.include(RSpec::Mocks::Methods)

config.run_all_when_everything_filtered = true
config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run_including :focus
config.filter_run_excluding :ruby => lambda {|version| config.filter_run_excluding :ruby => lambda {|version|
case version.to_s case version.to_s
when "!jruby" when "!jruby"
Expand Down

0 comments on commit 877dfa6

Please sign in to comment.