(./features/step_definitions/function_name_steps.rb)
Given /^the user has an account$/ do
@user = FactoryGirl.create(:user)
end
Use the outside to inside method. Your features should be abstract and using Factory Girl step definitions forces you to know specific details about the implementation of your application. See: http://robots.thoughtbot.com/post/25650434584/writing-better-cucumber-scenarios-or-why-were So keep in mind, you're testing the logic of the models (methodes, validations..) and controllers with Rspec and the views and 'behavior' of the end user with Cucumber. For some of those best practices, see: http://blog.codeship.io/2013/05/21/testing-tuesday-6-top-5-cucumber-best-practices.html
Using during Hartl rails 4.0 guide (http://ruby.railstutorial.org/chapters)
group :development, :test
gem 'guard-rspec'
gem 'guard-livereload'
gem 'spork-rails', github: 'sporkrb/spork-rails' # rubygems version not rails 4 compatible
gem 'guard-spork'
Using during Hartl rails 4.0 guide (http://ruby.railstutorial.org/chapters)
group :development, :test
gem 'guard-rspec'
gem 'guard-livereload'
gem 'spork-rails', github: 'sporkrb/spork-rails' # RubyGems.org nog uptodate
gem 'guard-spork'
gem 'childprocess'
[alias] | |
co = checkout | |
st = status | |
br = branch | |
com = commit | |
pl = pull | |
ps = push |
# Rails | |
*.rbc | |
*.sassc | |
.sass-cache | |
capybara-*.html | |
.rspec | |
.rvmrc | |
/.bundle | |
/vendor/bundle | |
/log/* |
# Meer vetalingen via https://github.com/plataformatec/devise/wiki/I18n | |
# Voeg 'config.i18n.default_locale = :nl' toe in je 'application.rb' en herstart je server | |
nl: | |
devise: | |
confirmations: | |
confirmed: "Je account is bevestigd, je bent nu ingelogd." | |
send_instructions: "Je zult een e-mail met instructies ontvangen over hoe je jouw account moet bevestigen over een paar minuten." | |
send_paranoid_instructions: "Als je e-mail bestaat in onze database, zul je een e-mail met instructies ontvangen over hoe je jouw account moet bevestigen over een paar minuten." | |
failure: |