Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SitePrism::FrozenInTimeError to catch frozen time issues #389

Merged
merged 1 commit into from
Apr 26, 2019
Merged

Add SitePrism::FrozenInTimeError to catch frozen time issues #389

merged 1 commit into from
Apr 26, 2019

Conversation

dkniffin
Copy link
Contributor

Copy link
Collaborator

@luke-hill luke-hill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix up the rspec errors also.


private

def check_for_time_stopped!
Copy link
Collaborator

@luke-hill luke-hill Apr 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to take the start_time as an argument I think. EDIT: This also needs to be a class method

@@ -26,5 +26,22 @@

expect(duration).to be_within(0.1).of(timeout)
end

context 'when time is frozen' do
before do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could probably be simplified to allow(Time).to receive(:now).and_return { Time.new(2019,4,25) } to save you having to open the class up - Might be a bit shorter as well

@dkniffin
Copy link
Contributor Author

@luke-hill Alright, fixed all that up, and tests are passing. Let me know if there's anything else needed here.

@luke-hill
Copy link
Collaborator

Top stuff, well done on the quick turnaround too. Thanks for the contribution, it's greatly appreciated.

@luke-hill luke-hill merged commit b68171a into natritmeyer:master Apr 26, 2019
@dkniffin dkniffin deleted the frozen-in-time-error branch April 26, 2019 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants