davydovanton / kan

Simple, functional authorization library and role management for ruby
http://www.kanrb.org
MIT License
232 stars 12 forks source link

Question: rspec matchers for testing? #12

Open davydovanton opened 6 years ago

berniechiu commented 6 years ago

I would like to work on this, any suggestion at first?

davydovanton commented 6 years ago

thanks for help! About suggestions: no idea. We can create some matchers for abilities and roles, WDYT? Also, we can check pundit or cancancan projects for inspiration 🤔

berniechiu commented 6 years ago

Here's the first phase of PR i've done, lack of some functionalities but I think it's quite useful https://github.com/davydovanton/kan/pull/15

davydovanton commented 6 years ago

After #15:

berniechiu commented 6 years ago

Just added here https://github.com/davydovanton/kan/pull/16 ❤️

After finished it, I bumped into some issues, I think can change it

davydovanton commented 6 years ago

@berniechiu not sure that I understand correct, could you explain little bit more why you want to use Struct?

berniechiu commented 6 years ago

Oh! Other solutions are ok, just that the classes are re-opened in each spec file, which looks weird since each spec file supposedly is using the test class individually.