Sha256: b8bb1aef4a75e01ea03626a244691564fc9d81e8f6c1cc5a02b3853c4d7fc9f4

Contents?: true

Size: 654 Bytes

Versions: 2

Compression:

Stored size: 654 Bytes

Contents

require 'json'
require_relative '../../lib/grepg.rb'

describe GrepPage::Parser do
  describe '.initialize' do
    context "expected behavior" do
      it "returns a set of cheats when username and topic are given" do
        parser = GrepPage::Parser.new(['kdavis', 'css'])
        output = capture_stdout { parser.run! }
        expect(output).to match(/colors/)
      end

      it "returns a set of cheats when username, topic and search term are given" do
        parser = GrepPage::Parser.new(['kdavis', 'css', '-s', 'colors'])
        output = capture_stdout { parser.run! }
        expect(output).to match(/colors/)
      end
    end
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grepg-0.0.3 spec/grepg/parser_spec.rb
grepg-0.0.2 spec/grepg/parser_spec.rb