Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
update gems
Browse files Browse the repository at this point in the history
  • Loading branch information
zsprackett committed Dec 27, 2016
1 parent c0721c5 commit 8eb780f
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.3-p448
2.3.1
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: ruby
rvm:
- 2.3.3
- 2.2.6
- 2.0.0
- 1.9.3
7 changes: 1 addition & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ gem 'log4r', '~> 1.1.10'
# Include everything needed to run rake, tests, features, etc.
group :development do
gem 'rdoc'
gem 'rspec'
gem 'rspec-mocks'
gem 'jeweler'
gem 'cane'
gem "factory_girl"
end

group :test do
gem 'rspec'
gem 'rspec-mocks'
gem 'rspec-collection_matchers'
gem "factory_girl"
gem 'coveralls', require: false
end
4 changes: 2 additions & 2 deletions spec/cloudwatchtographite_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

describe ".new" do
it "takes three parameters and returns a CloudwatchToGraphite::Base" do
@base.should be_an_instance_of CloudwatchToGraphite::Base
expect(@base).to be_an_instance_of(CloudwatchToGraphite::Base)
end
end

Expand All @@ -21,7 +21,7 @@
expect { @base.carbon_prefix = '' }.to \
raise_error(CloudwatchToGraphite::ArgumentLengthError)
@base.carbon_prefix = "the_prefix"
@base.carbon_prefix.should eql "the_prefix"
expect(@base.carbon_prefix).to eql("the_prefix")
end
end
end
Expand Down
38 changes: 19 additions & 19 deletions spec/metricdefinition_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

describe ".create_and_fill" do
it "should be a MetricDefinition" do
@definition.should be_an_instance_of \
CloudwatchToGraphite::MetricDefinition
expect(@definition).to \
be_an_instance_of(CloudwatchToGraphite::MetricDefinition)
end
it "should require valid arguments" do
expect {
Expand All @@ -30,13 +30,13 @@
describe ".new" do
it "takes no parameters and returns a MetricDefinition" do
d = CloudwatchToGraphite::MetricDefinition.new
d.should be_an_instance_of CloudwatchToGraphite::MetricDefinition
expect(d).to be_an_instance_of(CloudwatchToGraphite::MetricDefinition)
end
end

describe ".Namespace" do
it "returns the correct namespace" do
@definition.Namespace.should eql 'foonamespace'
expect(@definition.Namespace).to eql('foonamespace')
end
end

Expand All @@ -49,13 +49,13 @@
@definition.Namespace = @invalid_string
}.to raise_error(CloudwatchToGraphite::ArgumentLengthError)
@definition.Namespace = @valid_string
@definition.Namespace.should eql @valid_string
expect(@definition.Namespace).to eql(@valid_string)
end
end

describe ".MetricName" do
it "returns the correct metricname" do
@definition.MetricName.should eql 'foometricname'
expect(@definition.MetricName).to eql('foometricname')
end
end

Expand All @@ -68,17 +68,17 @@
@definition.MetricName = @invalid_string
}.to raise_error(CloudwatchToGraphite::ArgumentLengthError)
@definition.MetricName = @valid_string
@definition.MetricName.should eql @valid_string
expect(@definition.MetricName).to eql(@valid_string)
end
end

describe ".Statistics" do
it "returns the correct statistics" do
statistics = @definition.Statistics
statistics.should be_an Array
statistics.should include 'Sum'
statistics.should include 'Average'
statistics.should have(2).items
expect(statistics).to be_an(Array)
expect(statistics).to include('Sum')
expect(statistics).to include('Average')
expect(statistics).to have_exactly(2).items
end
end

Expand All @@ -104,7 +104,7 @@

describe ".Period" do
it "returns the correct period" do
@definition.Period.should eql 90
expect(@definition.Period).to eql(90)
end
end

Expand All @@ -114,7 +114,7 @@
@definition.Period = 'abc'
}.to raise_error(CloudwatchToGraphite::ArgumentTypeError)
@definition.Period = 1
@definition.Period.should eql 1
expect(@definition.Period).to eql(1)
end
end

Expand All @@ -125,19 +125,19 @@
@definition.add_dimension(d)
end
dimensions = @definition.Dimensions
dimensions.should be_an Array
dimensions.should have(2).items
expect(dimensions).to be_a(Array)
expect(dimensions).to have_exactly(2).items
dimensions.each do |d|
d.should be_a Hash
d.should have_key('Name')
d.should have_key('Value')
expect(d).to be_a(Hash)
expect(d).to have_key('Name')
expect(d).to have_key('Value')
end
end
end

describe ".Unit" do
it "returns the correct unit" do
@definition.Unit.should eql 'Bits'
expect(@definition.Unit).to eql('Bits')
end
end
end
14 changes: 7 additions & 7 deletions spec/metricdimension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

describe ".new" do
it "takes two parameters and returns a MetricDimension" do
@dimension.should be_an_instance_of \
CloudwatchToGraphite::MetricDimension
expect(@dimension).to \
be_an_instance_of(CloudwatchToGraphite::MetricDimension)
end
end

Expand All @@ -23,7 +23,7 @@
d = CloudwatchToGraphite::MetricDimension.create_from_hash(
{'name' => 'a', 'value' => 'b'}
)
d.should be_an_instance_of CloudwatchToGraphite::MetricDimension
expect(d).to be_an_instance_of(CloudwatchToGraphite::MetricDimension)
end
it "should require valid arguments" do
expect {
Expand All @@ -36,7 +36,7 @@

describe ".Name" do
it "returns the correct name" do
@dimension.Name.should eql 'testname'
expect(@dimension.Name).to eql('testname')
end
end

Expand All @@ -49,13 +49,13 @@
@dimension.Name = @invalid_string
}.to raise_error(CloudwatchToGraphite::ArgumentLengthError)
@dimension.Name = @valid_string
@dimension.Name.should eql @valid_string
expect(@dimension.Name).to eql(@valid_string)
end
end

describe ".Name" do
it "returns the correct value" do
@dimension.Value.should eql 'testval'
expect(@dimension.Value).to eql('testval')
end
end

Expand All @@ -68,7 +68,7 @@
@dimension.Value = @invalid_string
}.to raise_error(CloudwatchToGraphite::ArgumentLengthError)
@dimension.Value = @valid_string
@dimension.Value.should eql @valid_string
expect(@dimension.Value).to eql(@valid_string)
end
end
end
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
require 'coveralls'
require 'rspec'
require 'factory_girl'
require 'rspec/collection_matchers'

RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
end
Expand Down
2 changes: 1 addition & 1 deletion spec/version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

describe "CloudwatchToGraphite::VERSION" do
it "STRING must be defined" do
CloudwatchToGraphite::VERSION::STRING.should_not be_empty
expect(CloudwatchToGraphite::VERSION::STRING).not_to be_empty
end
end

0 comments on commit 8eb780f

Please sign in to comment.