Created
October 13, 2011 14:38
-
-
Save rdammkoehler/1284365 to your computer and use it in GitHub Desktop.
Can't get Gimme to match GregorianCalendar for verify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #I'm having a verify issue with gimme, I don't know if I've written the verify wrong or if gimme | |
| # does not support matches against Java classes. | |
| # | |
| require 'gimme' | |
| require 'orchestrator' | |
| java_import java.util.Calendar | |
| describe Orchestrator do | |
| describe "Pull" do | |
| describe "Orders" do | |
| before :all do | |
| @mock_orders_service = gimme OrdersWebService | |
| give(@mock_orders_service).orders(anything,anything) { [] } | |
| @orchestrator = Orchestrator.new @mock_orders_service #inject mock | |
| end | |
| it "uses the OrdersWebService" do | |
| @orchestrator.pull :orders #will use mock with 2 Calendars | |
| verify(@mock_orders_service).orders(is_a(GregorianCalendar), is_a(GregorianCalendar)) | |
| end | |
| end | |
| end | |
| end | |
| #Failures: | |
| # | |
| # 1) Orchestrator Pull Orders uses the OrdersWebService | |
| # Failure/Error: verify(@mock_orders_service).orders(is_a(GregorianCalendar), is_a(GregorianCalendar)) | |
| # Gimme::Errors::VerificationFailedError: | |
| # expected orders to have been called with #<Gimme::Matchers::IsA:0x430a14ad>#<Gimme::Matchers::IsA:0x4ad38c3d> | |
| # # ./spec/lib/orchestrator_spec.rb:30:in `(root)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment