1
0
Fork 0
mirror of https://github.com/omniauth/omniauth.git synced 2022-11-09 12:31:49 -05:00
omniauth--omniauth/spec/omniauth/form_spec.rb
2011-10-26 01:27:07 -04:00

23 lines
764 B
Ruby

require 'spec_helper'
describe OmniAuth::Form do
describe '.build' do
it 'should yield the instance when called with a block and argument' do
OmniAuth::Form.build{|f| f.should be_kind_of(OmniAuth::Form)}
end
it 'should evaluate in the instance when called with a block and no argument' do
OmniAuth::Form.build{ self.class.should == OmniAuth::Form }
end
end
describe '#initialize' do
it 'the :url option should supply to the form that is built' do
OmniAuth::Form.new(:url => '/awesome').to_html.should be_include("action='/awesome'")
end
it 'the :title option should set an H1 tag' do
OmniAuth::Form.new(:title => 'Something Cool').to_html.should be_include('<h1>Something Cool</h1>')
end
end
end