I just saw ccspec and it looks very promising.
https://github.com/zhangsu/ccspec
It mainly uses C ++ 11 constructs to create something that reads exactly the same as rspec. It seems like this would fit the bill if you were looking for rspec as a BDD tool. Take a look at the following example from the site:
class Student { public: bool hasPapers() const { return true; } string status() const { return "alumni"; } }; auto student_spec = describe("Student", [] { Student subject; it("has published papers", [subject] { expect(subject.hasPapers()).to(be_truthy); }); it("is alumni", [subject] { expect(subject.status()).to(eq("alumni")); }); });
Has anyone tried here? I'm not sure if it has rspec as a mockery of functionality, but it looks like you could use gmock to make a little mockery. Not quite there function for function with rspec, but could be as close as possible to C ++ 11
Atifm
source share