rushmorem / publicsuffix

An implementation of Mozilla's Public Suffix List in Rust
MIT License
96 stars 17 forks source link

[noise] any feedback about rspec ? #5

Closed mackwic closed 7 years ago

mackwic commented 7 years ago

Hello @rushmorem, I am glad to see you are using our crate, rspec ! :)

If you have any feedback, remarks about it, anything, please say it. We are looking for feedback to move forward and priorize features. What do you miss the most ? What have been painful ? What would you like to see in the docs or in the Readme ?

By the way, I see in your code test in the form:

    rdescribe("the list", |ctx| {
        ctx.it("should not be empty", || {
            assert!(!list.all().is_empty());
            pass!()
        });
        (...)
    });

Is there any problem with this form ?

    rdescribe("the list", |ctx| {
        ctx.it("should not be empty", || {
            !list.all().is_empty()) // <- returns bool, should be fine
        });
    });

(sorry for the issue, I didn't found your email)

rushmorem commented 7 years ago

Hello @mackwic. No need to apologise. You know your own library much better than I can ever hope to do. As such, your feedback on how I'm using it is highly appreciated. Thank you.

I typically code only against stable rust so I was delighted to discover rspec. I'm using it in all my new crates now. Unfortunately my use cases have been pretty simple so far so I haven't really pushed it to its limits.

Thanks for the tip about returning booleans. I must have missed that somehow. I thought I could only return a result.

mackwic commented 7 years ago

Thanks for the tip about returning booleans. I must have missed that somehow. I thought I could only return a result.

It was a new feature of 1.0-beta.3. Quite needed, actually. 😄 Also () is equivalent to Ok(()) so you can also just code with assert!.

Unfortunately my use cases have been pretty simple so far so I haven't really pushed it to its limits.

That's fine. If you have any question, any irk that itch you, or would like to point something specific you want to be improved, please tell us so in the rspec issues. We are working on adding environments to describe clauses, which would be like a kind of let in ruby rspec (but less powerful, sadly).