Rails 4 updates

This commit is contained in:
Stephan Kaag
2013-07-23 20:42:52 +02:00
parent 0a7bbb08e1
commit f99acebdaa
10 changed files with 41 additions and 37 deletions

View File

@@ -13,7 +13,11 @@ describe StaticController do
end
it "renders the file" do
response.should render_template('faq')
if rails4?
response.should render_template('static/faq.en')
else
response.should render_template('faq')
end
end
end
@@ -23,7 +27,11 @@ describe StaticController do
context "when #{setting_name} site setting is NOT set" do
it "renders the #{id} page" do
expect(subject).to render_template(id)
if rails4?
expect(subject).to render_template("static/#{id}.en")
else
expect(subject).to render_template(id)
end
end
end

View File

@@ -147,6 +147,7 @@ describe PostMover do
it "copies the OP, doesn't delete it" do
new_topic.should be_present
new_topic.posts.reload
new_topic.posts.first.raw.should == p1.raw
new_topic.reload

View File

@@ -661,7 +661,7 @@ describe Topic do
end
describe 'meta data' do
let(:topic) { Fabricate(:topic, meta_data: {hello: 'world'}) }
let(:topic) { Fabricate(:topic, meta_data: {'hello' => 'world'}) }
it 'allows us to create a topic with meta data' do
topic.meta_data['hello'].should == 'world'
@@ -671,7 +671,7 @@ describe Topic do
context 'existing key' do
before do
topic.update_meta_data(hello: 'bane')
topic.update_meta_data('hello' => 'bane')
end
it 'updates the key' do
@@ -681,7 +681,7 @@ describe Topic do
context 'new key' do
before do
topic.update_meta_data(city: 'gotham')
topic.update_meta_data('city' => 'gotham')
end
it 'adds the new key' do