Skip to content

Instantly share code, notes, and snippets.

@osiro
Created April 8, 2015 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osiro/0f2ad94ce8d0e816aae1 to your computer and use it in GitHub Desktop.
Save osiro/0f2ad94ce8d0e816aae1 to your computer and use it in GitHub Desktop.
describe ".published"
subject { Post.published(published_at) }
let(:published_at) { Time.now }
let(:published_post) { FactoryGirl.create :post, published_at: published_at }
let(:unpublished_post) { FactoryGirl.create :post, published_at: 1.day.from_now }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment