Sha256: 50a1bb45a332311842ffa77ffeb2405294d93f47ce7ba0f56aec8c1175159105

Contents?: true

Size: 795 Bytes

Versions: 2

Compression:

Stored size: 795 Bytes

Contents

require 'spec_helper'

describe Wombat::Properties do
  before(:each) do
    @props = Wombat::Properties.new
  end

  it 'should store event properties' do
    block_executed = false
    @props.title "/my/custom/selector", :text, { xmlns: "http://whatwg.org/xmlns" } do |x|
      block_executed = true
    end

    title = @props.get_property "title"

    title.name.should == "title"
    title.selector.should == "/my/custom/selector"
    title.format.should == :text
    title.namespaces.should == { xmlns: "http://whatwg.org/xmlns" }
    title.callback.should_not be_nil
    title.callback.call
    block_executed.should be_true
  end

  it 'should return all stored properties' do
    @props.name "something"
    @props.date DateTime.now

    @props.all_properties.size.should == 2
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wombat-0.1.2 spec/properties_spec.rb
wombat-0.1.1 spec/properties_spec.rb