summaryrefslogtreecommitdiff
path: root/spec/PostRunner_spec.rb
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2017-09-02 15:02:23 +0200
committerChris Schlaeger <chris@linux.com>2017-09-02 15:02:23 +0200
commit7a27b8c495b82a47cf8ec9e9caa72cf7bd25601f (patch)
tree7668c105f74ad6d9a0386d2ecd1793e8e18b6c00 /spec/PostRunner_spec.rb
parent3094a98faa4e91062b27628ba52ede2ea0080613 (diff)
downloadpostrunner-7a27b8c495b82a47cf8ec9e9caa72cf7bd25601f.zip
Eliminate use of Fixnum.
More recent versions of Ruby emit warnings when Fixnum is used. Fixnum is now replaced by Integer.
Diffstat (limited to 'spec/PostRunner_spec.rb')
-rw-r--r--spec/PostRunner_spec.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/PostRunner_spec.rb b/spec/PostRunner_spec.rb
index 08ed686..ab86191 100644
--- a/spec/PostRunner_spec.rb
+++ b/spec/PostRunner_spec.rb
@@ -90,15 +90,15 @@ describe PostRunner::Main do
it 'should list the imported file' do
v = postrunner(%w( list ))
- expect(v[:stdout].index(File.basename(@file1))).to be_a(Fixnum)
+ expect(v[:stdout].index(File.basename(@file1))).to be_a(Integer)
end
it 'should import the 2nd FIT file' do
postrunner([ 'import', @file2 ])
v = postrunner(%w( list ))
list = v[:stdout]
- expect(list.index(File.basename(@file1))).to be_a(Fixnum)
- expect(list.index(File.basename(@file2))).to be_a(Fixnum)
+ expect(list.index(File.basename(@file1))).to be_a(Integer)
+ expect(list.index(File.basename(@file2))).to be_a(Integer)
end
it 'should delete the first file' do
@@ -106,7 +106,7 @@ describe PostRunner::Main do
v = postrunner(%w( list ))
list = v[:stdout]
expect(list.index(File.basename(@file1))).to be_nil
- expect(list.index(File.basename(@file2))).to be_a(Fixnum)
+ expect(list.index(File.basename(@file2))).to be_a(Integer)
end
it 'should not import the deleted file again' do
@@ -114,7 +114,7 @@ describe PostRunner::Main do
v = postrunner(%w( list ))
list = v[:stdout]
expect(list.index(File.basename(@file1))).to be_nil
- expect(list.index(File.basename(@file2))).to be_a(Fixnum)
+ expect(list.index(File.basename(@file2))).to be_a(Integer)
end
it 'should rename FILE2.FIT activity' do
@@ -122,7 +122,7 @@ describe PostRunner::Main do
v = postrunner(%w( list ))
list = v[:stdout]
expect(list.index(File.basename(@file2))).to be_nil
- expect(list.index('foobar')).to be_a(Fixnum)
+ expect(list.index('foobar')).to be_a(Integer)
end
it 'should fail when setting bad attribute' do
@@ -135,7 +135,7 @@ describe PostRunner::Main do
v = postrunner(%w( list ))
list = v[:stdout]
expect(list.index(@file2)).to be_nil
- expect(list.index('foobar')).to be_a(Fixnum)
+ expect(list.index('foobar')).to be_a(Integer)
end
it 'should set activity type for 2nd activity' do
@@ -143,7 +143,7 @@ describe PostRunner::Main do
v = postrunner(%w( summary :1 ))
list = v[:stdout]
expect(list.index('Running')).to be_nil
- expect(list.index('Cycling')).to be_a(Fixnum)
+ expect(list.index('Cycling')).to be_a(Integer)
end
it 'should list the events of an activity' do
@@ -164,7 +164,7 @@ describe PostRunner::Main do
v = postrunner(%w( summary :1 ))
list = v[:stdout]
expect(list.index('Generic')).to be_nil
- expect(list.index('Road')).to be_a(Fixnum)
+ expect(list.index('Road')).to be_a(Integer)
end
it 'should fail when setting bad activity subtype' do
@@ -193,13 +193,13 @@ describe PostRunner::Main do
postrunner([ 'import', '--force', @file1 ])
v = postrunner([ 'records' ])
list = v[:stdout]
- expect(list.index(File.basename(@file1))).to be_a(Fixnum)
+ expect(list.index(File.basename(@file1))).to be_a(Integer)
# Add fast running activity
postrunner([ 'import', @file3 ])
v =postrunner([ 'records' ])
list = v[:stdout]
- expect(list.index(File.basename(@file3))).to be_a(Fixnum)
+ expect(list.index(File.basename(@file3))).to be_a(Integer)
expect(list.index(File.basename(@file1))).to be_nil
end
@@ -207,7 +207,7 @@ describe PostRunner::Main do
postrunner(%w( set norecord true :1 ))
v = postrunner([ 'records' ])
list = v[:stdout]
- expect(list.index(File.basename(@file1))).to be_a(Fixnum)
+ expect(list.index(File.basename(@file1))).to be_a(Integer)
expect(list.index(File.basename(@file3))).to be_nil
end