Skip to content

Instantly share code, notes, and snippets.

@mwhagedorn
Created July 8, 2016 13:07
Show Gist options
  • Save mwhagedorn/44ede7aba22e407785fbdc3a49516790 to your computer and use it in GitHub Desktop.
Save mwhagedorn/44ede7aba22e407785fbdc3a49516790 to your computer and use it in GitHub Desktop.
Failing expectation? wierd
let!(:product) { create(:trial_product, trial_type: "no_obligation") }
let!(:subscription) { create(:trial_subscription, product: product).tap(&:process) }
before do
Timecop.freeze(subscription.current_period_ends_at.utc + 1.minute) do
subscription.process
expect(subscription.state).to eq("trial_ended")
end
end
@mwhagedorn
Copy link
Author

the expectation on line 7 fails....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment