Skip to content

Instantly share code, notes, and snippets.

@phinze
Created September 30, 2009 14:41
Show Gist options
  • Save phinze/198141 to your computer and use it in GitHub Desktop.
Save phinze/198141 to your computer and use it in GitHub Desktop.
spec_acts_as_plugin(:acts_as_billable) do |plugin|
plugin.should require_methods(
:billable_amount,
:billable_description,
:billable_type,
:billable_user,
:billable_mfk
)
plugin.should define_methods(
:billed?
)
plugin.with(:bill_by_date => true).should require_columns(
[:effective_start_date, :datetime],
[:effective_end_date, :datetime],
[:quantity, :integer]
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment