spec/app_spec.rb in schnitzelpress-0.1.1 vs spec/app_spec.rb in schnitzelpress-0.2.0

- old
+ new

@@ -1,18 +1,12 @@ require 'spec_helper' -class TestApp < SchnitzelPress::App - configure do - set :blog_title, "A Test Blog" - end -end - -describe SchnitzelPress::App do +describe Schnitzelpress::App do include Rack::Test::Methods def app - TestApp + Schnitzelpress::App end describe 'the home page' do before do 2.times { Factory(:draft_post) } @@ -21,11 +15,11 @@ end subject { last_response } it { should be_ok } - its(:body) { should have_tag 'title', :text => "A Test Blog" } + its(:body) { should have_tag 'title', :text => Schnitzelpress::Config.instance.blog_title } its(:body) { should have_tag 'section.posts > article.post.published', :count => 5 } its(:body) { should_not have_tag 'section.posts > article.post.draft' } end describe 'the /blog page' do @@ -34,17 +28,17 @@ it { should be_ok } end describe 'the public feed url' do before do - TestApp.set :feed_url, 'http://feeds.feedburner.com/example_org' + Schnitzelpress::Config.instance.blog_feed_url = 'http://feeds.feedburner.com/example_org' get '/feed' end subject { last_response } it { should be_redirect } its(:status) { should == 307 } - specify { subject["Location"].should == 'http://feeds.feedburner.com/example_org' } + specify { subject["Location"].should == 'http://example.org/blog.atom' } end describe 'viewing a single post' do context 'when the post has multiple slugs' do before do