Skip to content

Commit

Permalink
Whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
leshill committed Dec 6, 2012
1 parent 03d4ccf commit 42b2465
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -208,7 +208,7 @@ You can also check the size of the schedule:

(And I take note of the `before` block that is calling `reset!` for every spec)

You can explicitly specify the queue when using enqueue_at_with_queue and
You can explicitly specify the queue when using enqueue_at_with_queue and
enqueue_in_with_queue:

describe "#recalculate_in_future" do
Expand Down Expand Up @@ -238,7 +238,7 @@ Then I write some code to make it pass:
def recalculate
Resque.enqueue_at(Time.now + 3600, Person, id, :calculate)
end

def recalculate_in_future
Resque.enqueue_at_with_queue(:future, Time.now + 3600, Person, id, :calculate)
end
Expand Down
8 changes: 4 additions & 4 deletions lib/resque_spec/matchers.rb
Expand Up @@ -130,7 +130,7 @@ def schedule_queue_for(actual)

RSpec::Matchers.define :have_scheduled do |*expected_args|
extend ScheduleQueueHelper

chain :at do |timestamp|
@interval = nil
@time = timestamp
Expand Down Expand Up @@ -198,7 +198,7 @@ def schedule_queue_for(actual)

RSpec::Matchers.define :have_schedule_size_of do |size|
extend ScheduleQueueHelper

match do |actual|
schedule_queue_for(actual).size == size
end
Expand All @@ -218,7 +218,7 @@ def schedule_queue_for(actual)

RSpec::Matchers.define :have_schedule_size_of_at_least do |size|
extend ScheduleQueueHelper

match do |actual|
schedule_queue_for(actual).size >= size
end
Expand All @@ -234,4 +234,4 @@ def schedule_queue_for(actual)
description do
"have schedule size of #{size}"
end
end
end
10 changes: 5 additions & 5 deletions spec/resque_spec/matchers_spec.rb
Expand Up @@ -285,10 +285,10 @@
Person.should_not have_scheduled(first_name, last_name).in(interval + 5 * 60)
end
end

context "with #queue(queue_name)" do
let(:interval) { 10 * 60 }

before(:each) do
Resque.enqueue_in_with_queue(:test_queue, interval, NoQueueClass, 1)
end
Expand Down Expand Up @@ -317,7 +317,7 @@
it "returns true if actual schedule size matches negative expectation" do
Person.should_not have_schedule_size_of(2)
end

context "with #queue(queue_name)" do
before(:each) do
Resque.enqueue_in_with_queue(:test_queue, 10 * 60, NoQueueClass, 1)
Expand Down Expand Up @@ -347,7 +347,7 @@
it "returns true if actual schedule size matches negative expectation" do
Person.should_not have_schedule_size_of_at_least(5)
end

context "with #queue(queue_name)" do
before(:each) do
Resque.enqueue_in_with_queue(:test_queue, 10 * 60, NoQueueClass, 1)
Expand All @@ -357,6 +357,6 @@
NoQueueClass.should have_schedule_size_of_at_least(1).queue(:test_queue)
end
end

end
end
12 changes: 6 additions & 6 deletions spec/resque_spec/scheduler_spec.rb
Expand Up @@ -107,7 +107,7 @@
ResqueSpec.schedule_for(NameFromClassMethod).first.should include(:time => Time.now + scheduled_in)
end
end

describe "#enqueue_at_with_queue" do
before do
Timecop.travel(Time.at(0)) do
Expand All @@ -126,12 +126,12 @@
it "sets the arguments on the queue" do
ResqueSpec.queue_by_name(:test_queue).first.should include(:time => scheduled_at)
end
it "uses the correct queue" do

it "uses the correct queue" do
ResqueSpec.queue_by_name(:test_queue).should_not be_empty
end
end

describe "#enqueue_in_with_queue" do
before do
Timecop.freeze(Time.now)
Expand All @@ -153,8 +153,8 @@
it "sets the arguments on the queue" do
ResqueSpec.queue_by_name(:test_queue).first.should include(:time => Time.now + scheduled_in)
end
it "uses the correct queue" do

it "uses the correct queue" do
ResqueSpec.queue_by_name(:test_queue).should_not be_empty
end
end
Expand Down

0 comments on commit 42b2465

Please sign in to comment.