Skip to content

Commit

Permalink
Merge pull request #1 from veloper/testing_overhaul
Browse files Browse the repository at this point in the history
Testing Overhaul
  • Loading branch information
veloper committed Jun 24, 2013
2 parents 35a1e67 + d6e1393 commit 6f8d4ff
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 22 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service_name: travis-ci
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: ruby
rvm:
- 1.9.3
- 1.9.2
- "1.9.3"
- "1.9.2"
- jruby-19mode
- rbx-19mode
13 changes: 12 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

### Version 0.0.5 - June 24th, 2013

* Testing
* Added `Minitest` gem as development dependency
* Removed `Turn` gem development dependency.
* Added Travis CI.
* Added Coveralls.

* Documentation
* Added `/wiki/pages` directories.

### Version 0.0.4 - June 11th, 2013

* Assertions
Expand All @@ -20,7 +31,7 @@

* `:role`
* `:resource`
* `:prilvilege`
* `:privilege`
* `:assertion` -- _Not utilized in `.allowed?()` method._

### Version <= 0.0.3
Expand Down
2 changes: 1 addition & 1 deletion lib/rend/acl/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Rend
class Acl
module Version
STRING = "0.0.4"
STRING = "0.0.5"
end
end
end
2 changes: 1 addition & 1 deletion rend-acl.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
spec.add_development_dependency "turn"
spec.add_development_dependency "minitest", "~> 5.0.5"


dependency_gems = ['rend-core']
Expand Down
7 changes: 1 addition & 6 deletions test/test_helper.rb → test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://coveralls.io Integration
require 'coveralls'
Coveralls.wear_merged!
Coveralls.wear!

# Gem
require 'rend/acl'
Expand All @@ -12,8 +12,3 @@

# Autorun tests
require "minitest/autorun"

# Optionally try to use TURN gem if we're in a RUBY_VERSION >= 1.9.3 environment
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9.2')
begin; require 'turn/autorun'; rescue LoadError; end
end
4 changes: 2 additions & 2 deletions test/test_acl.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'test_helper'
require 'helper'

class AclTest < MiniTest::Unit::TestCase
class AclTest < Minitest::Test

def setup
@acl = Rend::Acl.new
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require 'test_helper'
require 'helper'

class WikiPagesResourcesTest < MiniTest::Unit::TestCase
class DocumentationExamplesTest < Minitest::Test

def setup
@acl = Rend::Acl.new
end
def setup
@acl = Rend::Acl.new
end

def test_resource_inheritance_example
def test_wiki_resource_inheritance_example
city_resource = Rend::Acl::Resource.new("city")
building_resource = Rend::Acl::Resource.new("building")

Expand Down
4 changes: 1 addition & 3 deletions wiki/pages/resources.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Resources
A ***Resource*** is simply an object to which access is controlled.


## Resource Class
Rend-Acl provides the `Rend::Acl::Resource` class as a basic resource implementation for developers to use and/or extend as needed.

Expand Down Expand Up @@ -36,4 +34,4 @@ mayor_role = Rend::Acl::Role.new("mayor")
@acl.allowed? :role => mayor_role, :resource => city_resource # => TRUE, via explicitly set rule.
@acl.allowed? :role => mayor_role, :resource => building_resource # => TRUE, via resource rule inheritance
```
> **Example Test:** `rend-acl/test/test_wiki_pages_resources.rb#test_resource_inheritance_example` ***PASSING***
> **Associated Test:** `rend-acl/test/test_documentation_examples.rb#test_wiki_resource_inheritance_example`

0 comments on commit 6f8d4ff

Please sign in to comment.