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

Feature/home page #3

Merged
merged 9 commits into from
Sep 20, 2015
Merged

Feature/home page #3

merged 9 commits into from
Sep 20, 2015

Conversation

JuanitoFatas
Copy link
Contributor

  • Introducing Factory Girl
  • How to add more configs under spec/support
  • Ensure clean state across tests by DatabaseRewinder
  • Introducing DatabaseRewinder

As a user,
When I visit the home page,
Then I should see submitted links with respective title and url.
     Failure/Error: link = FactoryGirl.create(:link)
     ArgumentError:
       Factory not registered: link
     Failure/Error: link = FactoryGirl.create(:link)
     ActiveRecord::StatementInvalid:
       PG::NotNullViolation: ERROR:  null value in column "title"
violates not-null constraint
       DETAIL:  Failing row contains (19, null, null, 2015-09-20
07:33:32.939297, 2015-09-20 07:33:32.939297).
       : INSERT INTO "links" ("created_at", "updated_at") VALUES ($1,
$2) RETURNING "id"
     Failure/Error: expect(page).to have_link link.title, href: link.url
       expected to find link "deppbot" with href "https://www.deppbot.com" but there were no matches
     Failure/Error: visit root_path
     ActionView::Template::Error:
       undefined method `each' for nil:NilClass
Disable config.use_transactional_fixtures = false because

in https://relishapp.com/rspec/rspec-rails/docs/transactions

> If you prefer to manage the data yourself, or using another
> tool like database_cleaner to do it for you,
> simply tell RSpec to tell Rails not to manage transactions
JuanitoFatas added a commit that referenced this pull request Sep 20, 2015
@JuanitoFatas JuanitoFatas merged commit 49fc8cc into master Sep 20, 2015
@JuanitoFatas JuanitoFatas deleted the feature/home-page branch September 20, 2015 10:57
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.

1 participant