mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-21 09:40:13 +01:00
Added Rspec and Webrat plugins and started porting Selenium on Rails tests to Rspec Plain Text Stories driving Webrat driving Selenium.
This commit is contained in:
parent
0600756bbf
commit
0f7d6f7a1d
602 changed files with 47788 additions and 29 deletions
26
vendor/plugins/rspec/failing_examples/mocking_with_flexmock.rb
vendored
Normal file
26
vendor/plugins/rspec/failing_examples/mocking_with_flexmock.rb
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# stub frameworks like to gum up Object, so this is deliberately
|
||||
# set NOT to run so that you don't accidentally run it when you
|
||||
# run this dir.
|
||||
|
||||
# To run it, stand in this directory and say:
|
||||
#
|
||||
# RUN_FLEXMOCK_EXAMPLE=true ruby ../bin/spec mocking_with_flexmock.rb
|
||||
|
||||
if ENV['RUN_FLEXMOCK_EXAMPLE']
|
||||
Spec::Runner.configure do |config|
|
||||
config.mock_with :flexmock
|
||||
end
|
||||
|
||||
describe "Flexmocks" do
|
||||
it "should fail when the expected message is received with wrong arguments" do
|
||||
m = flexmock("now flex!")
|
||||
m.should_receive(:msg).with("arg").once
|
||||
m.msg("other arg")
|
||||
end
|
||||
|
||||
it "should fail when the expected message is not received at all" do
|
||||
m = flexmock("now flex!")
|
||||
m.should_receive(:msg).with("arg").once
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue