Permalink
Browse files

Cukes for RSpec.configuration.mock_framework.framework_name

  • Loading branch information...
1 parent 622505d commit 398c74ce8e1860e876ba71f91de6d79a2ded7c4a @justinko justinko committed Apr 1, 2011
View
6 features/mock_framework_integration/use_flexmock.feature
@@ -16,6 +16,12 @@ Feature: mock with flexmock
flexmock(target).should_receive(:foo).once
target.foo
end
+
+ describe "RSpec.configuration.mock_framework.framework_name" do
+ it "returns :flexmock" do
+ RSpec.configuration.mock_framework.framework_name.should eq(:flexmock)
+ end
+ end
end
"""
When I run `rspec ./flexmock_example_spec.rb`
View
6 features/mock_framework_integration/use_mocha.feature
@@ -16,6 +16,12 @@ Feature: mock with mocha
target.expects(:foo).once
target.foo
end
+
+ describe "RSpec.configuration.mock_framework.framework_name" do
+ it "returns :mocha" do
+ RSpec.configuration.mock_framework.framework_name.should eq(:mocha)
+ end
+ end
end
"""
When I run `rspec ./mocha_example_spec.rb`
View
6 features/mock_framework_integration/use_rr.feature
@@ -17,6 +17,12 @@ Feature: mock with rr
mock(target).foo
target.foo
end
+
+ describe "RSpec.configuration.mock_framework.framework_name" do
+ it "returns :rr" do
+ RSpec.configuration.mock_framework.framework_name.should eq(:rr)
+ end
+ end
end
"""
When I run `rspec rr_example_spec.rb`
View
6 features/mock_framework_integration/use_rspec.feature
@@ -16,6 +16,12 @@ Feature: mock with rspec
target.should_receive(:foo)
target.foo
end
+
+ describe "RSpec.configuration.mock_framework.framework_name" do
+ it "returns :rspec" do
+ RSpec.configuration.mock_framework.framework_name.should eq(:rspec)
+ end
+ end
end
"""
When I run `rspec ./rspec_example_spec.rb`

0 comments on commit 398c74c

Please sign in to comment.