Sha256: 23af805a402514538f9af813380a3f9be3c5631157d803049ccb3526a6b68123
Contents?: true
Size: 497 Bytes
Versions: 18
Compression:
Stored size: 497 Bytes
Contents
require 'test_helper' class ShortcutContext extend Surrounded::Context shortcut_triggers initialize :user, :other trigger :shorty do user.speak end role :user do def speak 'it works, shorty!' end end end describe Surrounded::Context, 'shortcuts' do let(:user){ User.new("Jim") } let(:other){ User.new("Guille") } it 'creates shortcut class methods for triggers' do assert_equal 'it works, shorty!', ShortcutContext.shorty(user, other) end end
Version data entries
18 entries across 18 versions & 1 rubygems