Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Order tests #6

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Hi Alan,

I've included my tests under a folder inside 'test'. The main reason for that is that I've used rspec for the tests and I've wanted to try them separately.

You may want to change the Gemfile in order to link parse_resource gem to your repository. I made the reference to my own so I could test the changes I could eventually introduce in my fork.

Regards

@adelevie adelevie commented on the diff Jan 24, 2012

test/ordertest/spec/post_spec.rb
@@ -0,0 +1,51 @@
+require_relative "../models/post"
+
+ParseResource::Base.load!(ENV['PARSE_APP_KEY'],ENV['PARSE_MASTER_KEY'])
+
+describe Post do
+
+ before(:each) do
@adelevie

adelevie Jan 24, 2012

Owner

I'm not too familiar with RSPEC...what does this block do? It gets run before every describe block, or before every it block?

@albertovilla

albertovilla Jan 24, 2012

It's executed before each of the tests (it blocks).

I have slightly modified the tests to make use of before(:all). Could you reject this pull request? I will make another pull request with the modified tests.

Also, I have a question. Why is the use of MASTER KEY required instead of the REST API key?

@adelevie

adelevie Jan 24, 2012

Owner

Sure.

The REST key isn't required because I built ParseResource before Parse had
special REST authentication. According to their docs, the REST api is
backwards compatible and should authenticate just fine.

I plan on adding the option to use a REST key instead, it's just not that
high of a priority unless people ask for it.

On Tue, Jan 24, 2012 at 12:20 PM, Alberto <
reply@reply.github.com

wrote:

@@ -0,0 +1,51 @@
+require_relative "../models/post"
+
+ParseResource::Base.load!(ENV['PARSE_APP_KEY'],ENV['PARSE_MASTER_KEY'])
+
+describe Post do
+

  • before(:each) do

It's executed before each of the tests (it blocks).

I have slightly modified the tests to make use of before(:all). Could
you reject this pull request? I will make another pull request with the
modified tests.

Also, I have a question. Why is the use of MASTER KEY required instead of
the REST API key?


Reply to this email directly or view it on GitHub:
https://github.com/adelevie/parse_resource/pull/6/files#r380434

@adelevie adelevie closed this Jan 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment