aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration/errors_spec.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-09-03 16:49:57 +0200
committerDavid Cabo <david@calibea.com>2011-09-03 16:49:57 +0200
commit7ad1ac47482d9ae5f89f80c89c83efcd0448ce3f (patch)
tree226ab2e86d375b2f9ecbe7490c441b80ee9a4919 /spec/integration/errors_spec.rb
parent641700a371001e7c60bb100d81dec8d44189a814 (diff)
Fix integration test breaking custom states spec
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