import os
import py.path
from tarbell.app import TarbellSite

PATH = os.path.realpath('examples/barebones')

def test_get_site():
    site = TarbellSite(PATH)

    assert os.path.realpath(site.path) == os.path.realpath(PATH)
    assert site.project.name == "barebones"


def test_generate_site(tmpdir):
    "Generate a static site matching what's in _site"
    site = TarbellSite(PATH)
    built = os.path.join(PATH, '_site')

    site.generate_static_site(str(tmpdir))

    files = set(f.basename for f in tmpdir.listdir())

    assert files == set(['data.json', 'index.html'])
import os
import py.path

from tarbell.app import EXCLUDES, TarbellSite

PATH = os.path.realpath('examples/barebones')

def test_get_site():
    site = TarbellSite(PATH)

    assert os.path.realpath(site.path) == os.path.realpath(PATH)
    assert site.project.name == "barebones"


def test_default_excludes():
    "Ensure a basic set of excluded files"
    site = TarbellSite(PATH)

    assert site.project.EXCLUDES == EXCLUDES


def test_generate_site(tmpdir):
    "Generate a static site matching what's in _site"
    site = TarbellSite(PATH)
    built = os.path.join(PATH, '_site')

    site.generate_static_site(str(tmpdir))

    files = set(f.basename for f in tmpdir.listdir())

    assert files == set(['data.json', 'index.html'])


Add a test for default excludes, which is failing
Add a test for default excludes, which is failing

  import os
  import py.path
+ 
- from tarbell.app import TarbellSite
+ from tarbell.app import EXCLUDES, TarbellSite
  
  PATH = os.path.realpath('examples/barebones')
  
  def test_get_site():
      site = TarbellSite(PATH)
  
      assert os.path.realpath(site.path) == os.path.realpath(PATH)
      assert site.project.name == "barebones"
+ 
+ 
+ def test_default_excludes():
+     "Ensure a basic set of excluded files"
+     site = TarbellSite(PATH)
+ 
+     assert site.project.EXCLUDES == EXCLUDES
  
  
  def test_generate_site(tmpdir):
      "Generate a static site matching what's in _site"
      site = TarbellSite(PATH)
      built = os.path.join(PATH, '_site')
  
      site.generate_static_site(str(tmpdir))
  
      files = set(f.basename for f in tmpdir.listdir())
  
      assert files == set(['data.json', 'index.html'])
+ 
+ 
Add a test for default excludes, which is failing
## Code Before:
import os
import py.path
from tarbell.app import TarbellSite

PATH = os.path.realpath('examples/barebones')

def test_get_site():
    site = TarbellSite(PATH)

    assert os.path.realpath(site.path) == os.path.realpath(PATH)
    assert site.project.name == "barebones"


def test_generate_site(tmpdir):
    "Generate a static site matching what's in _site"
    site = TarbellSite(PATH)
    built = os.path.join(PATH, '_site')

    site.generate_static_site(str(tmpdir))

    files = set(f.basename for f in tmpdir.listdir())

    assert files == set(['data.json', 'index.html'])
## Instruction:
Add a test for default excludes, which is failing
## Code After:
import os
import py.path

from tarbell.app import EXCLUDES, TarbellSite

PATH = os.path.realpath('examples/barebones')

def test_get_site():
    site = TarbellSite(PATH)

    assert os.path.realpath(site.path) == os.path.realpath(PATH)
    assert site.project.name == "barebones"


def test_default_excludes():
    "Ensure a basic set of excluded files"
    site = TarbellSite(PATH)

    assert site.project.EXCLUDES == EXCLUDES


def test_generate_site(tmpdir):
    "Generate a static site matching what's in _site"
    site = TarbellSite(PATH)
    built = os.path.join(PATH, '_site')

    site.generate_static_site(str(tmpdir))

    files = set(f.basename for f in tmpdir.listdir())

    assert files == set(['data.json', 'index.html'])

