aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-12 14:42:26 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-12 14:42:26 -0300
commit08f57bfb8f46e9f521b7d324fc47fe00d93f42bf (patch)
tree647ca1dc43ff9a3af58c56272691e41a6c8a2ec4 /railties/test
parentd08b89fa4b422c66b4e408d87e5d8e198299a2bd (diff)
downloadrails-08f57bfb8f46e9f521b7d324fc47fe00d93f42bf.tar.gz
rails-08f57bfb8f46e9f521b7d324fc47fe00d93f42bf.tar.bz2
rails-08f57bfb8f46e9f521b7d324fc47fe00d93f42bf.zip
Move the TestQueue tests to the proper file
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/queue_test.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/railties/test/application/queue_test.rb b/railties/test/application/queue_test.rb
index 5e7b938cbb..58173afc69 100644
--- a/railties/test/application/queue_test.rb
+++ b/railties/test/application/queue_test.rb
@@ -69,45 +69,6 @@ module ApplicationTests
refute job.ran_in_different_thread?, "Expected job to run in the same thread"
end
- class IdentifiableJob
- def initialize(id)
- @id = id
- end
-
- def ==(other)
- other.same_id?(@id)
- end
-
- def same_id?(other_id)
- other_id == @id
- end
-
- def run
- end
- end
-
- test "in test mode, the queue can be observed" do
- app("test")
-
- jobs = (1..10).map do |id|
- IdentifiableJob.new(id)
- end
-
- jobs.each do |job|
- Rails.queue.push job
- end
-
- assert_equal jobs, Rails.queue.jobs
- end
-
- test "in test mode, adding an unmarshallable job will raise an exception" do
- app("test")
- anonymous_class_instance = Struct.new(:run).new
- assert_raises TypeError do
- Rails.queue.push anonymous_class_instance
- end
- end
-
test "attempting to marshal a queue will raise an exception" do
app("test")
assert_raises TypeError do
@@ -115,14 +76,6 @@ module ApplicationTests
end
end
- test "attempting to add a reference to itself to the queue will raise an exception" do
- app("test")
- job = {reference: Rails.queue}
- assert_raises TypeError do
- Rails.queue.push job
- end
- end
-
def setup_custom_queue
add_to_env_config "production", <<-RUBY
require "my_queue"