aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration/errors_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/errors_spec.rb')
-rw-r--r--spec/integration/errors_spec.rb20
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