spec/baron_theme_spec.rb in baron-1.0.14 vs spec/baron_theme_spec.rb in baron-1.0.17
- old
+ new
@@ -11,28 +11,28 @@
@theme = Baron::Theme.new(@config)
@theme.load_config()
end
it "finds all parameters in theme_config.yml" do
- @theme.root.should == '/themes/typography'
- @theme[:root].should == '/themes/typography'
- @theme[:masthead_url].should == "http://www.my-corporation.com"
- @theme[:param_test].should == "FOOBAR"
- @theme[:company_description].should == "Insert content here"
+ expect(@theme.root).to eq('/themes/typography')
+ expect(@theme[:root]).to eq('/themes/typography')
+ expect(@theme[:masthead_url]).to eq("http://www.my-corporation.com")
+ expect(@theme[:param_test]).to eq("FOOBAR")
+ expect(@theme[:company_description]).to eq("Insert content here")
end
it "finds all the rendering templates" do
- @theme.get_template('article').should == SAMPLE_DATA_PATH + 'themes/typography/templates/article.rhtml'
- @theme.get_template('category').should == SAMPLE_DATA_PATH + 'themes/typography/templates/category.rhtml'
- @theme.get_template('error').should == SAMPLE_DATA_PATH + 'themes/typography/templates/error.rhtml'
- @theme.get_template('home').should == SAMPLE_DATA_PATH + 'themes/typography/templates/home.rhtml'
- @theme.get_template('layout').should == SAMPLE_DATA_PATH + 'themes/typography/templates/layout.rhtml'
+ expect(@theme.get_template('article')).to eq(SAMPLE_DATA_PATH + 'themes/typography/templates/article.rhtml')
+ expect(@theme.get_template('category')).to eq(SAMPLE_DATA_PATH + 'themes/typography/templates/category.rhtml')
+ expect(@theme.get_template('error')).to eq(SAMPLE_DATA_PATH + 'themes/typography/templates/error.rhtml')
+ expect(@theme.get_template('home')).to eq(SAMPLE_DATA_PATH + 'themes/typography/templates/home.rhtml')
+ expect(@theme.get_template('layout')).to eq(SAMPLE_DATA_PATH + 'themes/typography/templates/layout.rhtml')
end
it "doesn't crash with a bad or empty config file" do
theme = Baron::Theme.new({})
theme.load_config("#{SAMPLE_DATA_PATH}supplemental-files/theme_config.yml")
- theme.length.should == 4
+ expect(theme.length).to eq(4)
theme.load_config("FOOBAR-FAKE-URL-FAKE-FAKE")
- theme.length.should == 4
+ expect(theme.length).to eq(4)
end
end