pivo_flow 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -67,7 +67,11 @@ module PivoFlow
67
67
  end
68
68
 
69
69
  def show_info story=nil
70
- story = current_story if story.nil?
70
+ story = story || current_story
71
+ if story.nil?
72
+ puts "No story, no worry..."
73
+ return 1
74
+ end
71
75
  puts story_string(story, true)
72
76
  puts "\n[TASKS]"
73
77
  story.tasks.all.count.zero? ? puts(" no tasks") : print_tasks(story.tasks.all)
@@ -1,3 +1,3 @@
1
1
  module PivoFlow
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
@@ -6,7 +6,7 @@ describe PivoFlow::Pivotal do
6
6
 
7
7
  before do
8
8
  stub_git_config
9
-
9
+ PivoFlow::Pivotal.any_instance.stub(:puts)
10
10
  stub_base_methods(PivoFlow::Pivotal)
11
11
  end
12
12
 
@@ -60,6 +60,11 @@ describe PivoFlow::Pivotal do
60
60
 
61
61
  end
62
62
 
63
+ it "show_info returns 1 if there is no story" do
64
+ @project.stub_chain(:stories, :all).and_return([])
65
+ expect(pivotal.show_info).to eq 1
66
+ end
67
+
63
68
  describe "current_story" do
64
69
  before(:each) do
65
70
  @users_story1 = PivotalTracker::Story.new(owned_by: pivotal.user_name, current_state: "started")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivo_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-12 00:00:00.000000000 Z
12
+ date: 2012-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pivotal-tracker