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

uniqueness validation #19

Open
ernestoe opened this issue Jun 25, 2016 · 1 comment
Open

uniqueness validation #19

ernestoe opened this issue Jun 25, 2016 · 1 comment

Comments

@ernestoe
Copy link

The following syntax

describe Post do
  context 'validations' do
    subject { FactoryGirl.build(:post) }

    it do
      should validate_uniqueness_of(:slug).
        scoped_to(:user_id).
        with_message('duplicate slug within same user_id').
        case_insensitive
    end
  end
end

is supported by shoulda-matchers / Active Record .

Although some of the shoulda-matchers can be used with ActiveNode, the previous one cannot.

Is this something that neo4j-rspec can tackle?

@cheerfulstoic
Copy link
Collaborator

I imagine so, though I don't know if the gem stores state in such a way that neo4j-rspec could determine this or not. Let me know if something in the gem needs to change to help make this happen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants