Skip to content

Commit

Permalink
added useful gem functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
astockwell committed Apr 21, 2015
1 parent 1552fe8 commit 03daf23
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/gem_example.rb
@@ -1,5 +1,6 @@
require "gem_example/version" require "gem_example/version"
require "gem_example/cli/application" require "gem_example/cli/application"
require "gem_example/useful_functionality"


module GemExample module GemExample
# Your code goes here... # Your code goes here...
Expand Down
7 changes: 7 additions & 0 deletions lib/gem_example/useful_functionality.rb
@@ -0,0 +1,7 @@
module GemExample
module UsefulFunctionality
def self.DoSomethingUseful(string)
"#{string.upcase} is now useful"
end
end
end
7 changes: 7 additions & 0 deletions spec/gem_example/useful_functionality_spec.rb
@@ -0,0 +1,7 @@
require 'spec_helper'

describe GemExample::UsefulFunctionality do
it 'does the useful' do
expect(GemExample::UsefulFunctionality.DoSomethingUseful('Before')).to eq 'BEFORE is now useful'
end
end
12 changes: 4 additions & 8 deletions spec/gem_example_spec.rb
@@ -1,11 +1,7 @@
require 'spec_helper' require 'spec_helper'


describe GemExample do describe GemExample do
it 'has a version number' do it 'has a version number' do
expect(GemExample::VERSION).not_to be nil expect(GemExample::VERSION).not_to be nil
end end

end
it 'does something useful' do
expect(false).to eq(true)
end
end

0 comments on commit 03daf23

Please sign in to comment.