rubicure 0.0.7 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,16 +47,16 @@ describe Rubicure do
47
47
  end
48
48
 
49
49
  with_them do
50
- it{ expect{ Precure.send(title) }.not_to raise_error }
51
- it{ expect{ Precure.send(title).girls }.not_to raise_error }
50
+ it { expect { Precure.send(title) }.not_to raise_error }
51
+ it { expect { Precure.send(title).girls }.not_to raise_error }
52
52
  end
53
53
  end
54
54
 
55
55
  context "When Precure#<unmarked_precure_method>" do
56
- let(:futari_wa_pretty_cure){ Rubicure::Series.find(:unmarked) }
56
+ let(:futari_wa_pretty_cure) { Rubicure::Series.find(:unmarked) }
57
57
 
58
- it{ expect(Precure.title).to eq futari_wa_pretty_cure.title }
59
- it{ expect(Precure.girls.count).to eq futari_wa_pretty_cure.girls.count }
58
+ it { expect(Precure.title).to eq futari_wa_pretty_cure.title }
59
+ it { expect(Precure.girls.count).to eq futari_wa_pretty_cure.girls.count }
60
60
  end
61
61
  end
62
62
 
@@ -100,18 +100,18 @@ describe Rubicure do
100
100
  [:lovely],
101
101
  [:princess],
102
102
  [:honey],
103
- #[:fortune],
103
+ [:fortune],
104
104
  ]
105
105
  end
106
106
 
107
107
  with_them do
108
- it{ expect( Cure.send(name) ).to be_an_instance_of Rubicure::Girl }
109
- it{ expect( Cure.send(name).precure_name ).to be_start_with "キュア" }
108
+ it { expect( Cure.send(name) ).to be_an_instance_of Rubicure::Girl }
109
+ it { expect( Cure.send(name).precure_name ).to be_start_with "キュア" }
110
110
  end
111
111
 
112
112
  context "When precure who not starting 'cure'" do
113
- it{ expect( Shiny.luminous.precure_name ).to eq "シャイニールミナス"}
114
- it{ expect( Milky.rose.precure_name ).to eq "ミルキィローズ"}
113
+ it { expect( Shiny.luminous.precure_name ).to eq "シャイニールミナス" }
114
+ it { expect( Milky.rose.precure_name ).to eq "ミルキィローズ" }
115
115
  end
116
116
  end
117
117
  end
data/spec/series_spec.rb CHANGED
@@ -1,55 +1,55 @@
1
1
  describe Rubicure::Series do
2
2
  describe "#on_air?" do
3
- subject{ series.on_air?(date) }
3
+ subject { series.on_air?(date) }
4
4
 
5
5
  context "when ended title" do
6
- let(:series) {
6
+ let(:series) do
7
7
  Rubicure::Series[
8
8
  started_date: Date.parse("2012-02-05"),
9
9
  ended_date: Date.parse("2013-01-27"),
10
10
  ]
11
- }
11
+ end
12
12
 
13
13
  context "when Date arg" do
14
- let(:date){ Date.parse("2013-01-01") }
14
+ let(:date) { Date.parse("2013-01-01") }
15
15
 
16
- it{ should be true }
16
+ it { should be true }
17
17
  end
18
18
 
19
19
  context "when date like String arg" do
20
- let(:date){ "2013-01-01" }
20
+ let(:date) { "2013-01-01" }
21
21
 
22
- it{ should be true }
22
+ it { should be true }
23
23
  end
24
24
  end
25
25
 
26
26
  context "when live title" do
27
- let(:series) {
27
+ let(:series) do
28
28
  Rubicure::Series[
29
29
  started_date: Date.parse("2013-02-03"),
30
30
  ]
31
- }
31
+ end
32
32
 
33
- let(:date){ Date.parse("2013-12-01") }
33
+ let(:date) { Date.parse("2013-12-01") }
34
34
 
35
- it{ should be true }
35
+ it { should be true }
36
36
  end
37
37
  end
38
38
 
39
39
  describe "#girls" do
40
- subject{ series.girls }
40
+ subject { series.girls }
41
41
 
42
- let(:series) {
42
+ let(:series) do
43
43
  Rubicure::Series[
44
44
  girls: %w(cure_happy cure_sunny cure_peace cure_march cure_beauty)
45
45
  ]
46
- }
46
+ end
47
47
 
48
- it{ should have_exactly(5).girls }
49
- it{ should array_instance_of Rubicure::Girl }
48
+ it { should have_exactly(5).girls }
49
+ it { should all(be_instance_of Rubicure::Girl) }
50
50
  end
51
51
 
52
- let(:series_names) {
52
+ let(:series_names) do
53
53
  [
54
54
  :unmarked,
55
55
  :max_heart,
@@ -63,13 +63,13 @@ describe Rubicure::Series do
63
63
  :dokidoki,
64
64
  :happiness_charge,
65
65
  ]
66
- }
66
+ end
67
67
 
68
68
  describe "#===" do
69
- let(:series){ Rubicure::Series.find(series_name) }
70
- let(:series_name){ :smile }
71
- let(:girl){ Rubicure::Girl.find(girl_name) }
72
- let(:girl_name){ :peace }
69
+ let(:series) { Rubicure::Series.find(series_name) }
70
+ let(:series_name) { :smile }
71
+ let(:girl) { Rubicure::Girl.find(girl_name) }
72
+ let(:girl_name) { :peace }
73
73
 
74
74
  context "same series" do
75
75
  it { expect(series === series).to be true }
@@ -77,8 +77,8 @@ describe Rubicure::Series do
77
77
  end
78
78
 
79
79
  context "other series" do
80
- let(:other_series){ Rubicure::Series.find(:dokidoki) }
81
- let(:other_girl){ Rubicure::Girl.find(:passion) }
80
+ let(:other_series) { Rubicure::Series.find(:dokidoki) }
81
+ let(:other_girl) { Rubicure::Girl.find(:passion) }
82
82
  it { expect(series === other_series).to be false }
83
83
  it { expect(series === other_girl).to be false }
84
84
  end
@@ -93,32 +93,32 @@ describe Rubicure::Series do
93
93
  end
94
94
 
95
95
  describe "#names" do
96
- subject{ Rubicure::Series.names }
96
+ subject { Rubicure::Series.names }
97
97
 
98
- it{ should include *series_names }
98
+ it { should include *series_names }
99
99
  end
100
100
 
101
101
  describe "#uniq_names" do
102
- subject{ Rubicure::Series.uniq_names }
102
+ subject { Rubicure::Series.uniq_names }
103
103
 
104
- it{ should include *series_names }
105
- its(:count){ should == series_names.count }
104
+ it { should include *series_names }
105
+ its(:count) { should == series_names.count }
106
106
  end
107
107
 
108
108
  describe "#find" do
109
- subject{ Rubicure::Series.find(series_name) }
109
+ subject { Rubicure::Series.find(series_name) }
110
110
 
111
111
  context "when exists" do
112
- let(:series_name){ :smile }
112
+ let(:series_name) { :smile }
113
113
 
114
- its(:title){ should == "スマイルプリキュア!" }
115
- its(:girls){ should have_exactly(5).girls }
114
+ its(:title) { should == "スマイルプリキュア!" }
115
+ its(:girls) { should have_exactly(5).girls }
116
116
  end
117
117
 
118
118
  context "when not exists" do
119
- let(:series_name){ :ashita_no_nadja }
119
+ let(:series_name) { :ashita_no_nadja }
120
120
 
121
- it{ expect{subject}.to raise_error }
121
+ it { expect { subject }.to raise_error }
122
122
  end
123
123
  end
124
124
 
data/spec/spec_helper.rb CHANGED
@@ -15,7 +15,7 @@
15
15
  #
16
16
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
17
 
18
- require "codeclimate-test-reporter"
18
+ require 'codeclimate-test-reporter'
19
19
  CodeClimate::TestReporter.start
20
20
 
21
21
  require 'coveralls'
@@ -31,7 +31,7 @@ require 'delorean'
31
31
 
32
32
  # Requires supporting ruby files with custom matchers and macros, etc,
33
33
  # in spec/support/ and its subdirectories.
34
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
34
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
35
35
 
36
36
  RSpec.configure do |config|
37
37
  # The settings below are suggested to provide a good initial experience
@@ -104,6 +104,10 @@ RSpec.configure do |config|
104
104
 
105
105
  config.include Delorean
106
106
 
107
+ config.before(:each) do
108
+ Rubicure::Girl.sleep_sec = 0
109
+ end
110
+
107
111
  config.after(:each) do
108
112
  back_to_the_present
109
113
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubicure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-29 00:00:00.000000000 Z
11
+ date: 2014-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -187,6 +187,7 @@ extra_rdoc_files: []
187
187
  files:
188
188
  - ".coveralls.yml"
189
189
  - ".gitignore"
190
+ - ".hound.yml"
190
191
  - ".rspec"
191
192
  - ".travis.yml"
192
193
  - ".yardopts"
@@ -213,7 +214,6 @@ files:
213
214
  - spec/rubicure_spec.rb
214
215
  - spec/series_spec.rb
215
216
  - spec/spec_helper.rb
216
- - spec/support/array_instance_of.rb
217
217
  homepage: https://github.com/sue445/rubicure
218
218
  licenses:
219
219
  - MIT
@@ -245,5 +245,4 @@ test_files:
245
245
  - spec/rubicure_spec.rb
246
246
  - spec/series_spec.rb
247
247
  - spec/spec_helper.rb
248
- - spec/support/array_instance_of.rb
249
248
  has_rdoc:
@@ -1,12 +0,0 @@
1
- require "rspec"
2
-
3
- =begin
4
- example)
5
- [1, 2, 3].should array_instance_of Fixnum
6
- =end
7
-
8
- RSpec::Matchers.define :array_instance_of do |element_class|
9
- match do |array|
10
- array.class == Array && array.all? {|element| element.class == element_class}
11
- end
12
- end