require 'spec_helper' shared_examples_for 'not_authorize_for' do |users, options| users.each do |user| it 'raises error if asked to consume invalid event' do yield ddd.should eq(43) end end end describe ApplicationHelper do def self.it_should_not_authorize_for(object, users=[], options={}, &block) users.each do |user| object.it "should not authorize for #{user}" do block.call end end end describe ".add_tag" do it "should generate content for div tag with empty content" do helper.add_tag(:div, class: 'example') { }.should eq("
") end it "should generate content for div tag with one element" do helper.add_tag(:div, class: 'example') { 'Example' }.should eq("