saki 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/saki.rb +22 -6
- data/saki.gemspec +2 -2
- metadata +4 -4
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "saki"
|
8
8
|
gem.summary = %Q{Allows terse acceptance testing}
|
9
|
-
gem.description = %Q{Cucumber scenarios are
|
9
|
+
gem.description = %Q{Cucumber scenarios are long and confusing sometimes. Release yourself from the tyranny of client-centered specing!}
|
10
10
|
gem.email = "nate@ludicast.com"
|
11
11
|
gem.homepage = "http://github.com/ludicast/saki"
|
12
12
|
gem.authors = ["Nate Kidwell"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/saki.rb
CHANGED
@@ -8,10 +8,16 @@ module Saki
|
|
8
8
|
|
9
9
|
def add_opts(link, opts)
|
10
10
|
if opts[:parent]
|
11
|
-
"/#{opts[:parent].class.to_s.tableize}/#{opts[:parent].id}" + link
|
12
|
-
|
13
|
-
|
11
|
+
link = "/#{opts[:parent].class.to_s.tableize}/#{opts[:parent].id}" + link
|
12
|
+
end
|
13
|
+
if opts[:format]
|
14
|
+
link = link + ".#{opts[:format]}"
|
14
15
|
end
|
16
|
+
link
|
17
|
+
end
|
18
|
+
|
19
|
+
def has_link(href)
|
20
|
+
page.should have_xpath("//a[@href='#{href}']")
|
15
21
|
end
|
16
22
|
|
17
23
|
def has_link_for(model, opts = {})
|
@@ -21,7 +27,7 @@ module Saki
|
|
21
27
|
|
22
28
|
def has_link_for_editing(model, opts = {})
|
23
29
|
href = add_opts "/#{model.class.to_s.tableize}/#{model.id}/edit", opts
|
24
|
-
|
30
|
+
has_link href
|
25
31
|
end
|
26
32
|
|
27
33
|
def has_link_for_deleting(model, opts = {})
|
@@ -31,14 +37,24 @@ module Saki
|
|
31
37
|
|
32
38
|
def has_link_for_creating(model_type, opts = {})
|
33
39
|
href = add_opts "/#{model_type.to_s.tableize}/new", opts
|
34
|
-
|
40
|
+
has_link href
|
35
41
|
end
|
36
42
|
|
37
43
|
def has_link_for_indexing(model_type, opts = {})
|
38
44
|
href = add_opts "/#{model_type.to_s.tableize}", opts
|
39
|
-
|
45
|
+
has_link href
|
40
46
|
end
|
41
47
|
|
48
|
+
def should_be_on(page_name)
|
49
|
+
current_path = URI.parse(current_url).path
|
50
|
+
if page_name.is_a? String
|
51
|
+
current_path.should == page_name
|
52
|
+
else
|
53
|
+
current_path.should match(page_name)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
|
42
58
|
module ClassMethods
|
43
59
|
def with_existing resource, &block
|
44
60
|
context "with exisiting #{resource}" do
|
data/saki.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{saki}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nate Kidwell"]
|
12
12
|
s.date = %q{2010-08-30}
|
13
|
-
s.description = %q{Cucumber scenarios are
|
13
|
+
s.description = %q{Cucumber scenarios are long and confusing sometimes. Release yourself from the tyranny of client-centered specing!}
|
14
14
|
s.email = %q{nate@ludicast.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nate Kidwell
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: "0"
|
33
33
|
type: :development
|
34
34
|
version_requirements: *id001
|
35
|
-
description: Cucumber scenarios are
|
35
|
+
description: Cucumber scenarios are long and confusing sometimes. Release yourself from the tyranny of client-centered specing!
|
36
36
|
email: nate@ludicast.com
|
37
37
|
executables: []
|
38
38
|
|