Sha256: 28f70f4c6142c3c778f04efc3d08cae3c51c14104dc0c1d11f3bac3ec7067aaa
Contents?: true
Size: 622 Bytes
Versions: 1
Compression:
Stored size: 622 Bytes
Contents
require 'spec_helper' describe DiviningRod::Mapper do before :each do @root_definition = DiviningRod::Definition.new { true } mapper = DiviningRod::Mapper.new(@root_definition, {:tags => [:fuck], :foo => true}) mapper.ua /Safari/, :tags => [:baz] do |map| map.with_options :tags => :awsome do |awesome| awesome.ua /Apple/, :tags => [:foo] end end end it "should map a definition" do request = mock("rails_request", :user_agent => 'Apple Mobile Safari', :format => :html) result = @root_definition.evaluate(request) result.tags.should include(:fuck) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
divining_rod-0.4.0 | spec/mapper_spec.rb |