diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-09-05 12:32:17 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-09-05 12:32:17 +0100 |
commit | 7f0ae82d44873b53cc87c659b42415ce4866c7b4 (patch) | |
tree | fdce14b0658bb05aef087dd4e09dc25c9a79ea8c /spec/integration/errors_spec.rb | |
parent | 2926ee877bcf8974c529e1271ded42971fe0d632 (diff) | |
parent | 96c4dd912083edcd0c9eda76bd2301bb4a1a6d53 (diff) |
Merge branch 'develop' of github.com:sebbacon/alaveteli into develop, fix conflicts
Diffstat (limited to 'spec/integration/errors_spec.rb')
-rw-r--r-- | spec/integration/errors_spec.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/spec/integration/errors_spec.rb b/spec/integration/errors_spec.rb index 84a44c9c3..c64ca79e8 100644 --- a/spec/integration/errors_spec.rb +++ b/spec/integration/errors_spec.rb @@ -1,18 +1,5 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') -module TestCustomStates - def self.included(base) - base.extend(ClassMethods) - end - - module ClassMethods - def theme_extra_states - return ['crotchety'] - end - end -end - - describe "When rendering errors" do fixtures [ :info_requests, @@ -49,11 +36,8 @@ describe "When rendering errors" do end it "should render a 500 for general errors" do ir = info_requests(:naughty_chicken_request) - InfoRequest.send(:include, TestCustomStates) - InfoRequest.class_eval('@@custom_states_loaded = true') - ir.set_described_state("crotchety") - ir.save! - InfoRequest.class_eval('@@custom_states_loaded = false') + # Set an invalid state for the request. Note that update_attribute doesn't run the validations + ir.update_attribute(:described_state, "crotchety") get("/request/#{ir.url_title}") response.code.should == "500" end |