Skip to content

Instantly share code, notes, and snippets.

@anathematic
Created January 24, 2011 05:00
Show Gist options
  • Save anathematic/792858 to your computer and use it in GitHub Desktop.
Save anathematic/792858 to your computer and use it in GitHub Desktop.
## Test
require 'active_merchant'
class Foo
include ActiveMerchant::Billing::CreditCardMethods
end
describe Foo do
it "should respond to methods in CreditCardMethods" do
@foo = Foo.new
@foo.should respond_to(:valid_month?)
@foo.should respond_to(:valid_number?)
end
end
## Failure
Failures:
1) Foo should respond to methods in CreditCardMethods
Failure/Error: @foo.should respond_to(:valid_number?)
expected #<Foo:0x00000102afe008> to respond to :valid_number?
# ./spec/models/subscription_spec.rb:11:in `block (2 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment