Skip to content
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

Circleci project setup #10

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2.1
orbs:
ruby: circleci/[email protected]

jobs:
build:
docker:
- image: circleci/ruby:2.6.3-stretch-node
executor: ruby/default
steps:
- checkout
- run:
name: Which bundler?
command: bundle -v
- ruby/bundle-install
3 changes: 3 additions & 0 deletions lib/nytimes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3443,4 +3443,7 @@ class Nytimes
}
]
}



end
8 changes: 8 additions & 0 deletions test/nytimes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,27 @@ def setup
def test_it_can_get_copyright
#Set your code to the local variable, "result"

result = @hash[:copyright]

# binding.pry
assert result, "Copyright (c) 2018 The New York Times Company. All Rights Reserved."
end

def test_it_can_get_array_of_stories
#Set your code to the local variable, "result"

result = @hash[:results]

assert result.is_a? (Array)
assert_equal 44, result.count
end

def test_it_can_get_all_stories_with_subsection_of_politics
#Set your code to the local variable, "result"

result = @hash[:results].select do |element|
element[:subsection] == "Politics"
end

assert result.is_a? (Array)
assert_equal 6, result.count
Expand Down