19 Oct '13, 2pm

RSpec/Capybara入門|ポイントシステム(7) -- context @feedlyさんから

require 'spec_helper' describe ReceptionDesk, '#sign_in' do context 'ユーザー名とパスワードが一致する場合' do let(:customer) { create(:customer, username: 'taro', password: 'correct_password') } specify '該当するCustomerオブジェクトを返す' do result = ReceptionDesk.new(customer.username, 'correct_password').sign_in expect(result).to eq(customer) end specify 'RewardManager#grant_login_pointsが呼ばれる' do expect_any_instance_of(RewardManager).to receive(:grant_login_points) ReceptionDesk.new(customer.username, 'correct_password').sign_in end end context '該当するユーザー名が存在しない場合' do specify 'nilを返す' do result = ReceptionDesk.new('hanako', 'any_string').sign_in expect(result).to be_nil end specify 'RewardManager#grant_login_pointsは呼ばれない' do expect_any_instance_of(RewardManager).not_to receive(:grant_login_points) ReceptionDesk.new('hanako', 'any_string').sign_in end end context 'パスワードが一致しない場合' do specify 'nilを返す' do ...

Full article: http://www.oiax.jp/rails/rspec_capybara_primer/reward_sys...

Tweets

RSpec/Capybara入門|ポイントシステム(8) -- データベーストランザクション ...

oiax.jp 19 Oct '13, 2pm

require 'spec_helper' describe RewardManager, '#grant_login_points' do let(:customer) { create(:customer) } let(:date_boun...

Rails Tips|Decorator/Presenter @feedlyさんから

oiax.jp 20 Oct '13, 4pm

class UserPresenter attr_accessor :user, :view_context delegate :family_name, :given_name, to: :user def initialize(user, ...

Spork/Zeus/Spring によるテスト実行時間の短縮 - RSpec/Capybar...

oiax.jp 11 Oct '13, 8pm

Starting Zeus server [ready] [crashed] [running] [connecting] [waiting] boot └── default_bundle ├── development_environmen...

What if you got search results before you even ...

seochat.com 13 Oct '13, 1pm

Recently, at LeWeb ’10 in Paris, France, Tech Crunch’s Michael Arrington interviewed Marissa Mayer, the new head of consum...

A Universe In Ruby

rubyflow.com 14 Oct '13, 7pm

is an open source (AGPLv3+) Universe Simulator written in Ruby (eventmachine) that provides a JSON-RPC API to create, quer...

“第8回 deploy:rollback と deploy:cleanup - Capistr...

oiax.jp 17 Oct '13, 4am

* executing `deploy:rollback' * executing `deploy:rollback_code' * executing "ls -x /var/rails/ballad/releases" servers: [...

Rails 4.0.1.rc1 has been released! Please give ...

weblog.rubyonrails.org 17 Oct '13, 4pm

I am happy to announce that Rails 4.0.1.rc1 has been released. This is a bug fix release and includes more than 450 commit...

@creativereason see this category: @excid3 @rbates

railscasts.com 18 Oct '13, 6pm

AngularJS is an awesome framework for easily creating rich, client-side applications. Its powerful bindings allow you to d...