hq-dev 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6336b7532441c0e429e5e6ff867da74411261697
4
- data.tar.gz: f6e3397e06cc72ac70f131371591dc22df0b08f9
3
+ metadata.gz: ad42d04f4d6edcdca3ebfc869a8e505ab0a4167c
4
+ data.tar.gz: b5b17bdb9cc271d1972e7aed0c3d69c38b694a6c
5
5
  SHA512:
6
- metadata.gz: 2a6c1e7fd162ab8b2a9deeb4baffb99ba163e2e09e3a03bcde892e31bff1f7e7300ccff5d5524a39cca63d650beaed8cb1474b989358667ff3627a9a372fde76
7
- data.tar.gz: 8e8841b6dbd96e3a32d98ea136d795ba4d1e22abacf8120fd0436f3abd4caf1545ad3820846bcee582a26fd9d8661fde38afba409d4e4fe513fe4e10943d89ed
6
+ metadata.gz: a9261497526accacc67bba022039f2417950477f2c0670c7b6fbb2bdab331c0d8ad14c7cba6b198cebccdca8f76fa4615f22fe92ada7990d86fe2a3c723db1b2
7
+ data.tar.gz: abb29a0030b6ad549b44a13b6c797c370bf8b5882020ed04dcdbf2c11fea1719ea40d2ecee01e3feb3a2c912302a67150144fbf63133dff1d5cf26ef9cbaa064
data/data/gem-versions CHANGED
@@ -1,7 +1,7 @@
1
1
  bson_ext 1.8.5
2
2
  capybara 2.0.2
3
3
  cucumber 1.3.1
4
- hq-dev 0.0.9
4
+ hq-dev 0.0.10
5
5
  hq-engine 0.0.3
6
6
  hq-tools 0.8.0
7
7
  hq-web 0.0.2
@@ -1,17 +1,21 @@
1
1
  Feature: Temporary directory and files
2
2
 
3
- Scenario:
3
+ Background:
4
4
 
5
5
  Given a file "features/support/env.rb":
6
6
  """
7
7
  require "hq/cucumber/temp-dir"
8
8
  """
9
+
10
+ Scenario: Create a file
11
+
9
12
  Given a file "features/support/steps.rb":
10
13
  """
11
14
  Then /^the file is created correctly$/ do
12
15
  File.read("abc.def").should == "Hello world"
13
16
  end
14
17
  """
18
+
15
19
  And a file "features/test.feature":
16
20
  """
17
21
  Feature:
@@ -31,3 +35,34 @@ Feature: Temporary directory and files
31
35
  1 scenario (1 passed)
32
36
  2 steps (2 passed)
33
37
  """
38
+
39
+ Scenario: Create a directory
40
+
41
+ Given a file "features/support/steps.rb":
42
+ """
43
+ Then /^the directory exists$/ do
44
+ Dir.exist?("some-dir").should be_true
45
+ end
46
+ Then /^the directory does not exist$/ do
47
+ Dir.exist?("some-dir").should be_false
48
+ end
49
+ """
50
+
51
+ And a file "features/test.feature":
52
+ """
53
+ Feature:
54
+ Scenario: Create dir
55
+ Given a directory "some-dir"
56
+ Then the directory exists
57
+ Scenario: Remove between runs
58
+ Then the directory does not exist
59
+ """
60
+
61
+ When I run "cucumber"
62
+
63
+ Then the exit status should be 0
64
+ And the output should contain:
65
+ """
66
+ 2 scenarios (2 passed)
67
+ 3 steps (3 passed)
68
+ """
@@ -18,7 +18,7 @@ After do
18
18
 
19
19
  end
20
20
 
21
- Given /^a file "(.*?)":$/ do
21
+ Given /^a file "(.+)":$/ do
22
22
  |file_name, file_contents|
23
23
 
24
24
  dir_name = File.dirname file_name
@@ -33,3 +33,10 @@ Given /^a file "(.*?)":$/ do
33
33
  end
34
34
 
35
35
  end
36
+
37
+ Given /^a directory "(.+)"$/ do
38
+ |dir_name|
39
+
40
+ Dir.mkdir dir_name
41
+
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hq-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pharaoh