This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
before(:each) do | |
@attr = { :name => "Example User", :email => "user@example.com" } | |
end | |
it "should create a new instance given valid attributes" do | |
User.create!(@attr) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
before(:each) do | |
@attr = { :name => "Example User", :email => "user@example.com" } | |
end | |
. | |
. | |
. | |
it "should reject email addresses identical up to case" do | |
upcased_email = @attr[:email].upcase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
before(:each) do | |
@attr = { :name => "Example User", :email => "user@example.com" } | |
end | |
it "should create a new instance given valid attributes" do | |
User.create!(@attr) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
before(:each) do | |
@attr = { :name => "Example User", :email => "user@example.com" } | |
end | |
it "should create a new instance given valid attributes" do | |
User.create!(@attr) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
before(:each) do | |
@attr = { :name => "Example User", :email => "user@example.com" } | |
end | |
. | |
. | |
. | |
it "should accept valid email addresses" do | |
addresses = %w[user@foo.com THE_USER@foo.bar.org first.last@foo.jp] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe User do | |
before(:each) do | |
@attr = { | |
:name => "Example User", | |
:email => "user@example.com", | |
:password => "foobar", | |
:password_confirmation => "foobar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
. | |
. | |
. | |
describe "password encryption" do | |
before(:each) do | |
@user = User.create!(@attr) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe User do | |
before(:each) do | |
@attr = { | |
:name => "Example User", | |
:email => "user@example.com", | |
:password => "foobar", | |
:password_confirmation => "foobar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe User do | |
before(:each) do | |
@attr = { | |
:name => "Example User", | |
:email => "user@example.com", | |
:password => "foobar", | |
:password_confirmation => "foobar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "pointer = 1 2 3 5 4 6 7 8 9 10 11 12" >> ~/.Xmodmap; xmodmap ~/.Xmodmap |