-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding unit tests #353
Adding unit tests #353
Conversation
This should help us test new model/collection contributions and help keep our collections the same across the board.
assert obj.respond_to?(:each), "#{klass} should be enumerable" | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
require "helpers/test_helper" | ||
|
||
class UnitTestCollections < MiniTest::Test | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning.
t.name = "unit" | ||
t.description = "Run Unit tests" | ||
t.libs << "test" | ||
t.pattern = FileList['test/unit/**/test_*.rb'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
assert obj.respond_to?(:each), "#{klass} should be enumerable" | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
require "helpers/test_helper" | ||
|
||
class UnitTestCollections < MiniTest::Test | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning.
t.name = "unit" | ||
t.description = "Run Unit tests" | ||
t.libs << "test" | ||
t.pattern = FileList['test/unit/**/test_*.rb'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
3090815
to
84228d1
Compare
assert obj.respond_to?(:each), "#{klass} should be enumerable" | ||
end | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end.
Wohoo \o/ Unit tests are successfully running on Travis. Now just to fix the |
Fog::Compute::Google::Operation, | ||
Fog::Compute::Google::Zone, | ||
Fog::Compute::Google::Snapshot, | ||
Fog::Compute::Google::Project ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.
# Top-level ancestors we do not test | ||
common_ancestors = [Fog::Model, Fog::Compute::Server] | ||
# Do not test models that do not have a create method in API | ||
exceptions = [ Fog::Compute::Google::MachineType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.
This should now be done. |
Thanks! |
This should help us keep models/collections the same across the board and avoid issues like #352 and help newcomers iterate quickly to avoid us needing to point out missing methods like in #348