diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-02-15 10:02:30 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-02-15 10:02:30 +0000 |
commit | dcc312ac215b57afc648725bb8d64ff287bf7798 (patch) | |
tree | c22365bae12a7ba7c60dbb31dd88dc3e16a214fc /vendor/gems/rspec-1.3.1/features/mocks | |
parent | 506af7a640f63b17000ccfc5e1344bbc3039c913 (diff) |
Merge jpmckinney/bundler
Diffstat (limited to 'vendor/gems/rspec-1.3.1/features/mocks')
3 files changed, 0 insertions, 110 deletions
diff --git a/vendor/gems/rspec-1.3.1/features/mocks/block_local_expectations.feature b/vendor/gems/rspec-1.3.1/features/mocks/block_local_expectations.feature deleted file mode 100644 index f0155d429..000000000 --- a/vendor/gems/rspec-1.3.1/features/mocks/block_local_expectations.feature +++ /dev/null @@ -1,62 +0,0 @@ -Feature: block local expectations - - In order to set message expectations on ... - As an RSpec user - I want to configure the evaluation context - - Background: - Given a file named "account.rb" with: - """ - class Account - def self.create - yield new - end - - def opening_balance(amount, currency) - end - end - """ - - Scenario: passing example - Given a file named "account_dsl.rb" with: - """ - require 'spec_helper' - require 'account' - - describe "account DSL" do - it " .... " do - account = Account.new - Account.should_receive(:create).and_yield do |account| - account.should_receive(:opening_balance).with(100, :USD) - end - Account.create do - opening_balance 100, :USD - end - end - end - """ - When I run "spec account_dsl.rb" - Then the stdout should include "1 example, 0 failures" - - Scenario: failing example - - Given a file named "account_dsl.rb" with: - """ - require 'spec_helper' - require 'account' - - describe "account DSL" do - it " .... " do - account = Account.new - Account.should_receive(:create).and_yield do |account| - account.should_receive(:opening_balance).with(100, :USD) - end - Account.create do - # opening_balance is not called here - end - end - end - """ - - When I run "spec account_dsl.rb" - Then the stdout should include "1 example, 1 failure" diff --git a/vendor/gems/rspec-1.3.1/features/mocks/mix_stubs_and_mocks.feature b/vendor/gems/rspec-1.3.1/features/mocks/mix_stubs_and_mocks.feature deleted file mode 100644 index deaf84ecf..000000000 --- a/vendor/gems/rspec-1.3.1/features/mocks/mix_stubs_and_mocks.feature +++ /dev/null @@ -1,22 +0,0 @@ -Feature: stub and mock together - - As an RSpec user - I want to use stubs and mocks together - - Scenario: stub in before - Given a file named "stub_and_mocks_spec.rb" with: - """ - describe "a stub in before" do - before(:each) do - @messenger = mock('messenger').as_null_object - end - - it "a" do - @messenger.should_receive(:foo).with('first') - @messenger.foo('second') - @messenger.foo('third') - end - end - """ - When I run "spec stub_and_mocks_spec.rb --format nested" - Then the stdout should include "received :foo with unexpected arguments\n expected: (\"first\")\n got: ([\"second\"], [\"third\"])" diff --git a/vendor/gems/rspec-1.3.1/features/mocks/stub_implementation.feature b/vendor/gems/rspec-1.3.1/features/mocks/stub_implementation.feature deleted file mode 100644 index 269de4742..000000000 --- a/vendor/gems/rspec-1.3.1/features/mocks/stub_implementation.feature +++ /dev/null @@ -1,26 +0,0 @@ -Feature: stub implementation - - As an rspec user, I want to stub a complete implementation, not just a - return value. - - Scenario: stub implementation - Given a file named "stub_implementation.rb" with: - """ - describe "a stubbed implementation" do - it "works" do - object = Object.new - object.stub(:foo) do |arg| - if arg == :this - "got this" - elsif arg == :that - "got that" - end - end - - object.foo(:this).should == "got this" - object.foo(:that).should == "got that" - end - end - """ - When I run "spec stub_implementation.rb" - Then the stdout should include "1 example, 0 failures" |