spec/massimo/helpers_spec.rb in massimo-0.8.1 vs spec/massimo/helpers_spec.rb in massimo-0.8.2
- old
+ new
@@ -1,26 +1,36 @@
require 'spec_helper'
describe Massimo::Helpers do
- it { should include(SinatraMore::OutputHelpers) }
- it { should include(SinatraMore::TagHelpers) }
- it { should include(SinatraMore::AssetTagHelpers) }
- it { should include(SinatraMore::FormHelpers) }
- it { should include(SinatraMore::FormatHelpers) }
+ it { should include(Padrino::Helpers::DomHelpers) }
+ it { should include(Padrino::Helpers::OutputHelpers) }
+ it { should include(Padrino::Helpers::TagHelpers) }
+ it { should include(Padrino::Helpers::AssetTagHelpers) }
+ it { should include(Padrino::Helpers::FormHelpers) }
+ it { should include(Padrino::Helpers::FormatHelpers) }
+ it { should include(Padrino::Helpers::NumberHelpers) }
+ it { should include(Padrino::Helpers::TranslationHelpers) }
let(:helpers) { Object.new.extend(Massimo::Helpers) }
describe '#render' do
- it 'should render a view with the given locals' do
+ it 'renders a view with the given locals' do
with_file 'views/partial.haml', '= local' do
helpers.render('partial', :local => 'Local').should == "Local\n"
end
end
end
describe '#site' do
- it 'should return the current site instance' do
+ it 'returns the current site instance' do
site = Massimo::Site.new
helpers.site.should === site
+ end
+ end
+
+ describe '#config' do
+ it 'returns the current site configuration' do
+ site = Massimo::Site.new
+ helpers.config.should === site.config
end
end
end
\ No newline at end of file