Skip to content

Commit

Permalink
change fixture names
Browse files Browse the repository at this point in the history
  • Loading branch information
FuriKuri committed Nov 4, 2012
1 parent c8b487d commit 45e880c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
4 changes: 2 additions & 2 deletions test/fixtures/books.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html

one:
clean_code:
title: Clean Code
description: A book about clean code.
image_url: image.png
owner_id: 1
lent_to_user_id: 1

two:
java:
title: Java for Beginners
description: Java book.
image_url:
Expand Down
12 changes: 6 additions & 6 deletions test/fixtures/users.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html

one:
name: user1
tim:
name: tim
password: secret
email: user1@email.com
email: tim@email.com

two:
name: user2
daniel:
name: damiel
password: secert
email: user2@email.com
email: daniel@email.com
2 changes: 1 addition & 1 deletion test/functional/books_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class BooksControllerTest < ActionController::TestCase
setup do
@book = books(:one)
@book = books(:clean_code)
end

test "should get index" do
Expand Down
2 changes: 1 addition & 1 deletion test/functional/users_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class UsersControllerTest < ActionController::TestCase
setup do
@user = users(:one)
@user = users(:tim)
end

test "should get index" do
Expand Down
6 changes: 1 addition & 5 deletions test/unit/user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class UserTest < ActiveSupport::TestCase

test "should not save user with an existing name" do
user = User.new
user.name = 'user1'
user.name = 'tim'
user.password = 'secret'
user.email = 'user@email.com'
assert user.invalid?
Expand All @@ -92,8 +92,4 @@ class UserTest < ActiveSupport::TestCase
user.email = 'user1@email.com'
assert user.invalid?
end

# test "the truth" do
# assert true
# end
end

0 comments on commit 45e880c

Please sign in to comment.