screenomat/spec/lib/screenie/dsl/builder_spec.rb

25 lines
597 B
Ruby
Raw Normal View History

2010-12-09 21:20:21 +00:00
require 'spec_helper'
require 'screenie/dsl/builder'
describe Screenie::DSL::Builder do
describe '#sessions' do
context 'from block' do
subject { Screenie::DSL::Builder.new { session("cats") { } }}
specify { subject[:cats].should_not be_nil }
end
context 'from code' do
subject { Screenie::DSL::Builder.new(%{session("cats") { } })}
specify { subject[:cats].should_not be_nil }
end
end
describe '#first' do
subject { Screenie::DSL::Builder.new { session do; end }}
its(:first) { should be_a_kind_of(Screenie::DSL::Session) }
end
end