This file contains hidden or 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
FactoryGirl.define do | |
factory :user do | |
login "login" | |
firstname Faker::Name.first_name | |
lastname Faker::Name.last_name | |
end | |
end |
This file contains hidden or 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' | |
require 'shared_examples_for_views' | |
describe "users/new" do | |
#generalized method to check a field | |
def check_field(form, id, options={}) | |
field = form.find_field(id) | |
options.keys.each do |key| | |
field[key].should eq options[key].to_s |
This file contains hidden or 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
module ApplicationHelper | |
def link_to_sprite(sprite_class, url_or_object, options={}) | |
link_to url_or_object, options do | |
content_tag :i, :class => sprite_class do end | |
end | |
end | |
def render_button(obj, right, display, url_or_object, options={}) | |
if can? right, obj |