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 method to filter a page's entries by time, resolves #9 #10

Merged
merged 1 commit into from Mar 27, 2019

Conversation

mbeasley
Copy link
Collaborator

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 87.043% when pulling fb7187b on entry_filtering into 93a1132 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 87.043% when pulling fb7187b on entry_filtering into 93a1132 on master.

Copy link
Collaborator

@robertam3 robertam3 left a comment

Choose a reason for hiding this comment

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

@mbeasley one minor suggestion but overall this lgtm 👍

time = page.started_date_time + 0.250
entries = page.entries_before(time)
entries.each do |entry|
(entry.started_date_time + entry.time / 1000.to_f).should < time
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we use expect instead of should here?

expect(entry.started_date_time + entry.time / 1000.to_f).to be < time

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can, but I was going with consistency with the current style using RSpec 2.0, figuring a larger task would be to bump to 3.8 and update specs in general to the more modern matcher style.

@robertam3 robertam3 assigned mbeasley and unassigned robertam3 Mar 26, 2019
@mbeasley mbeasley merged commit db6607e into master Mar 27, 2019
@mbeasley mbeasley deleted the entry_filtering branch March 27, 2019 13:38
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.

None yet

3 participants