Sha256: 57fdf298fd8a6395fa0a1f12123b11b7f160831781f94b073512f05e0b5df82b
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
Feature: sets validations Background: Given I successfully run `bundle exec rails new testapp --skip-bundle --skip-sprockets --skip-javascript` And I cd to "testapp" And I add "factory_girl_rails" as a dependency And I add "valle" from this project as a dependency And I successfully run `bundle install` And I successfully run `bundle exec rails g model User name:string` And I successfully run `bundle exec rake db:migrate --trace` @disable-bundler Scenario: Using Valle automatically sets validations When I write to "test/unit/user_test.rb" with: """ require 'test_helper' class UserTest < ActiveSupport::TestCase setup do @user = FactoryGirl.create(:user) end test "should not save user when name is too long" do @user.name = 'a' * 256 assert !@user.save assert_equal 1, @user.errors.count end end """ When I successfully run `bundle exec rake test --trace` Then the output should contain "1 runs, 2 assertions, 0 failures, 0 errors"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
valle-1.0.1 | features/sets_validations.feature |