diff --git a/README.md b/README.md index 803fe78..3e0b465 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ This repository uses [Rspec](https://rspec.info/) for testing and [simplecov](ht ## Requirements -- Ruby 2.7 or above - Test run with [bundle exec rspec](https://rspec.info/) - An account on Qlty (free for open source) - `QLTY_COVERAGE_TOKEN` is set as a GitHub Actions [repository secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) @@ -29,3 +28,7 @@ Join the our [Slack Community](https://example.com) for help and to provide feed ## License [MIT License](./LICENSE.md) + +## Support + +You can can contact us at https://qlty.ai/support diff --git a/bin/setup b/bin/setup index dce67d8..39e09e6 100755 --- a/bin/setup +++ b/bin/setup @@ -3,6 +3,5 @@ set -euo pipefail IFS=$'\n\t' set -vx +puts "Installing gems" bundle install - -# Do any other automated setup that you need to do here diff --git a/lib/dog.rb b/lib/dog.rb new file mode 100644 index 0000000..9b14fc4 --- /dev/null +++ b/lib/dog.rb @@ -0,0 +1,26 @@ +# This is the dog class +class Dog + def initialize(name) + @name = name + end + + # This method is currently covered by a test + def name + "#{@name}!!!" + end + + # FIXME: add a condition + # This method is NOT currently covered by a test + def age_in_dog_years + 46 + end + + def age_in_human_years + 9 + end + + def bark + name + end +end + diff --git a/spec/dog_spec.rb b/spec/dog_spec.rb new file mode 100644 index 0000000..d9e0378 --- /dev/null +++ b/spec/dog_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +require "dog" + +RSpec.describe Dog do + describe "#name" do + it "is super excited about its name" do + expect(Dog.new("Milo").name).to eq("Milo!!!") + end + end + + describe "#age_in_dog_years" do + it "is 45 for some reason" do + expect(Dog.new("Milo").age_in_dog_years).to eq 46 + end + end +end + diff --git a/spec/sample_spec.rb b/spec/sample_spec.rb index 953057c..9e85c22 100644 --- a/spec/sample_spec.rb +++ b/spec/sample_spec.rb @@ -1,11 +1,15 @@ # frozen_string_literal: true RSpec.describe Sample do - it "can add two numbers" do - expect(Sample.add(3,4)).to eq(7) - end + # it "can add two numbers" do + # expect(Sample.add(3,4)).to eq(7) + # end it "can add subtract numbers" do expect(Sample.subtract(5,2)).to eq(3) end + + it "can add multiply numbers" do + expect(Sample.multiply(5,2)).to eq(10) + end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 74414a9..d56d726 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,6 +11,7 @@ require "sample" + RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status"