Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

spec: a bit of uniformization

  • Loading branch information...
commit 55e5630f630dd93f996f8d4eb9b2d34a9d288242 1 parent f060b5c
@jmettraux jmettraux authored
View
1  spec/resources/errors_spec.rb
@@ -1,6 +1,7 @@
require 'spec_helper'
+
describe '/_ruote/errors' do
context 'without any running processes' do
View
9 spec/resources/expressions_spec.rb
@@ -1,6 +1,7 @@
require 'spec_helper'
+
describe '/_ruote/expressions' do
before(:each) do
@@ -20,7 +21,7 @@
end
end
- describe 'GET /_ruote/expressions/wfid' do
+ describe 'GET /_ruote/expressions/:wfid' do
context 'with running processes' do
@@ -67,7 +68,7 @@ class fei links name parent state
end
end
- describe 'GET /_ruote/expressions/fei' do
+ describe 'GET /_ruote/expressions/:fei' do
context 'with running processes' do
@@ -183,7 +184,7 @@ class fei links name parent state
end
end
- describe 'DELETE /_ruote/expressions/fei' do
+ describe 'DELETE /_ruote/expressions/:fei' do
context 'with running processes' do
@@ -332,7 +333,7 @@ class fei links name parent state
end
end
- describe 'PUT /_ruote/expressions/fei' do
+ describe 'PUT /_ruote/expressions/:fei' do
before(:each) do
View
2  spec/resources/index_spec.rb
@@ -1,5 +1,7 @@
+
require 'spec_helper'
+
describe 'GET /' do
it 'returns a welcome message in HTML be default' do
View
2  spec/resources/participants_spec.rb
@@ -1,5 +1,7 @@
+
require 'spec_helper'
+
describe '/_ruote/participants' do
before(:each) do
View
7 spec/resources/processes_spec.rb
@@ -1,6 +1,7 @@
require 'spec_helper'
+
describe '/_ruote/processes' do
before(:each) do
@@ -112,7 +113,7 @@ def process_links(wfid)
end
end
- describe 'GET /_ruote/processes/wfid' do
+ describe 'GET /_ruote/processes/:wfid' do
context 'with a running process' do
@@ -196,7 +197,7 @@ def process_links(wfid)
end
end
- describe 'PUT /_ruote/processes/wfid' do
+ describe 'PUT /_ruote/processes/:wfid' do
context 'without a valid process' do
@@ -430,7 +431,7 @@ def process_links(wfid)
end
- describe 'DELETE /_ruote/processes/wfid' do
+ describe 'DELETE /_ruote/processes/:wfid' do
before(:each) do
View
3  spec/resources/schedules_spec.rb
@@ -1,6 +1,7 @@
require 'spec_helper'
+
describe '/_ruote/schedules' do
before(:each) do
@@ -78,7 +79,7 @@
end
end
- describe 'GET /_ruote/schedules/wfid' do
+ describe 'GET /_ruote/schedules/:wfid' do
before(:each) do
View
5 spec/resources/workitems_spec.rb
@@ -1,6 +1,7 @@
require 'spec_helper'
+
describe '/_ruote/workitems' do
before(:each) do
@@ -106,7 +107,7 @@ def workitem_count(from, to, of)
end
end
- describe 'GET /_ruote/workitems/wfid' do
+ describe 'GET /_ruote/workitems/:wfid' do
context 'with workitems' do
@@ -267,7 +268,7 @@ def workitem_count(from, to, of)
end
end
- describe 'PUT /_ruote/workitems/fei' do
+ describe 'PUT /_ruote/workitems/:fei' do
before(:each) do
View
1  spec/spec_helper.rb
@@ -1,3 +1,4 @@
+
ENV['RACK_ENV'] = 'test'
require 'rspec'
View
23 spec/webapp_helpers_spec.rb
@@ -1,5 +1,7 @@
+
require 'spec_helper'
+
describe RuoteKit::Helpers::RenderHelpers do
describe 'alink()' do
@@ -235,7 +237,6 @@ def settings
'a', :rel => 'next')
html.should_not have_selector(
'a', :rel => 'last')
-
end
it 'paginates correctly (corner case 30 items, limit 10, skip 20)' do
@@ -250,7 +251,6 @@ def settings
'a', :rel => 'next')
html.should_not have_selector(
'a', :rel => 'last')
-
end
it 'does not show there is an item if there is none' do
@@ -273,7 +273,6 @@ def settings
'a', :rel => 'next')
html.should_not have_selector(
'a', :rel => 'last')
-
end
it 'ignores negative values for skip param' do
@@ -288,7 +287,6 @@ def settings
# perhaps a redirection to the same url but with a sane param would be
# more appropriate?
-
end
it 'ignores values for the skip param larger than the number of items' do
@@ -303,19 +301,16 @@ def settings
# perhaps a redirection to the same url but with a sane param would be
# more appropriate?
-
end
-
end
-
private
- # Simulates Sinatra::Helpers#uri.
- def uri(addr = nil, absolute = true, add_script_name = true)
- addr
- end
- alias :url :uri
- alias :to :uri
-
+ # Simulates Sinatra::Helpers#uri.
+ def uri(addr = nil, absolute = true, add_script_name = true)
+ addr
+ end
+ alias :url :uri
+ alias :to :uri
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.